in reply to Re: Append to file or create file depending on input filename.
in thread Append to file or create file depending on input filename.
I was wondering the same.
To (ab)use 2-arg open in the way the OP describes, he has to do some trickery like:
C:\>perl script.pl ">outfile" C:\>rem Or C:\>perl script.pl ^>outfile
which will effectively hide the output redirect from the cmd and result in an $ARGV[0] containing >outfile.
In Section
Seekers of Perl Wisdom