Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re^2: Append to file or create file depending on input filename.

by pKai (Priest)
on Nov 20, 2009 at 13:48 UTC ( #808435=note: print w/ replies, xml ) Need Help??


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.


Comment on Re^2: Append to file or create file depending on input filename.
Select or Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://808435]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (12)
As of 2014-08-28 16:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (264 votes), past polls