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

You could use Devel::Symdump to dump out all of the scalars, however you would need to put this in you original source file. If everything is global, then you could probably just stick this at the end.
use strict; use warnings; require('YIKES.pl'); use Devel::Symdump; use Data::Dumper; my @array = Devel::Symdump->scalars('main'); print Dumper \@array;

Update: You could also have the script above require the original script, and since the vars are global it should work.(Code Updated)

Replies are listed 'Best First'.
Re: Re: Extract variables from file (split? regex? backflip?)
by bunnyman (Hermit) on Sep 04, 2003 at 14:33 UTC

    Maybe this is obvious, but using require on input files can be dangerous because it will run the code in that file.