Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Locked thread
IcePotato
Dec 29, 2003

There was nothing to fear
Nothing to fear
i loving hate perl right now. it's mysteriously eating up variables and things that worked fine at 2 am are now broken. this is a last resort for me.

e: problem solved for now

This is a script that takes in some symbol table information and a C source file, then attempts to output a html file with anchors at variable declarations and links to the declaration whe'er a variable is used. With scoping, which is why the control structure is so hosed up - you need to check the scope of every single variable used and select the variable from the closest scope. It's gone from "working almost perfectly" to "completely broken" after like 2 lines of code, and I'm a huge jackass who doesn't use repositories or version control. Right now, the highlighted line doesn't print at all even though it should - it certainly printed before, with no changes to the symbol table or source code. On top of that, we need to sometimes strip the last character because it correctly states that "array" != "array[]" even though we need tags around "array[]".

any advice? I swore i understood perl scoping and everything, but apparently i don't.

also is there any way that that giant if statement below the highlighted line has side effects I don't know about? I used identical nested if statements to get some debug messages and when I tried to replace that huge one with nested ones, things mysteriously stopped working.

edit: gently caress I FORGOT TO USE \S INSTEAD OF S

IcePotato fucked around with this message at 19:10 on Nov 9, 2007

Adbot
ADBOT LOVES YOU

IcePotato
Dec 29, 2003

There was nothing to fear
Nothing to fear

Triple Tech posted:

So, problem solved? On the aside, something about your Perl doesn't jive with me... It might be something completely superficial like "I didn't write it". Do you have any inputs I could run it against?

i'm im'g you about this because to be honest this is a school assignment and last thing I need is a TA wondering why my code is all over the internet, if anyone else is interested I will also talk to them about it in private

  • Locked thread