in reply to Extract variables from file (split? regex? backflip?)

If you're cross-referencing a Perl program, consider B::Xref. For example,
perl -MO=Xref YIKES.pl
should dump all your variables including where they are defined and used.

Your Perl code is messed-up, by the way. You've got a double-quote midway through that first line, and near the end of the third line. And those percents aren't going to work either. {grin}

-- Randal L. Schwartz, Perl hacker
Be sure to read my standard disclaimer if this is a reply.

Replies are listed 'Best First'.
Re: Re: Extract variables from file (split? regex? backflip?)
by Lori713 (Pilgrim) on Sep 04, 2003 at 00:55 UTC
    Thanks for the suggestion! I especially like the idea that I can also find out where they were defined and used. That's just like getting a cherry on top of the icing on the cake!!

    Just so folks won't think I'm a complete idiot: ;-D

    I agree whole-heartedly that the Perl pseudo code won't work (I noted that it wouldn't work in the original post). It's similar to what was given to me to own (minus some weird characters I inserted in my sample pseudo code to show how the variables might appear in the rest of the 8000 lines) (see my original post Sub-initiate needs help getting started for the history of that 8000 line Perl file if you're interested).

Re: Re: Extract variables from file (split? regex? backflip?)
by Lori713 (Pilgrim) on Sep 04, 2003 at 15:55 UTC
         perl -MO=Xref YIKES.pl

    Works like a charm! Thanks!