The stupid question is the question not asked | |
PerlMonks |
Re: Get Entire Command Line of a Programby kcott (Archbishop) |
on Oct 20, 2010 at 03:14 UTC ( [id://866236]=note: print w/replies, xml ) | Need Help?? |
As noted, you can get your commandline arguments, except for IO redirection, via @ARGV. Whatever IO redirection has been specified is available within your Perl script via STDIN, STDOUT and STDERR. Here's how you can get at the filenames:
That obviously needs substantial error checking and other work for a serious script but hopefully it's at least a start in right direction. -- Ken
In Section
Seekers of Perl Wisdom
|
|