in reply to importing values
you can put it in the environment... (only works if you call last.pl from find.pl)`last.pl $source`; #in last.pl my $source = $ARGV[0];
pass it on STDIN$ENV{SOURCE} = $source; `last.pl`; #in last.pl my $source = $ENV{SOURCE};
Those are probably the easiest/best ways... there are other ways, such as using a file, passing over a socket, shared memory, creating a dynamic link to last.pl named for the value of source and running the dynamic link, and then reading the value of $0 in last.pl (don't do that one). Many many ways.open(LAST, "|last.pl") or die $!; print LAST "$source"; close LAST; #in last.pl $source = <STDIN>;
- Ant
- Some of my best work - Fish Dinner
|
|---|