Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re^3: How to pass a file to GetOpt

by onelesd (Pilgrim)
on Jul 10, 2012 at 22:09 UTC ( #980962=note: print w/replies, xml ) Need Help??


in reply to Re^2: How to pass a file to GetOpt
in thread How to pass a file to GetOpt

# usage: # script.pl /path/to/infile /path/to/outfile die "infile not defined\n" if (! defined $ARGV[0]) ; die "outfile not defined\n" if (! defined $ARGV[1]) ; open my $infile, "< $ARGV[0]" or die "can't read $ARGV[0]\n" ; open my $outfile, "> $ARGV[1]" or die "can't write $ARGV[1]\n" ; while (<$infile>) { chomp ; print $outfile "=>$_<\n" ; }

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (3)
As of 2023-09-30 09:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?