Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: Uncommon* but Useful Perl Command Line Options

by Abigail-II (Bishop)
on Jan 29, 2004 at 00:20 UTC ( [id://324839]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
     
        $ perl -wl -e 'print "This is line 1";' \
                   -e 'print "This is line 2";' \
                   -e 'print "This is line 3";' \
                   -e 'print "This is line 4";' \
                   -e 'print "This is line 5";'
    
  2. or download this
        while(<>) { print ; }
    
  3. or download this
          
        $ perl -MO=Deparse -pe '1'
        LINE: while (defined($_ = <ARGV>)) {
    ...
            print $_;
        }
        -e syntax OK
    
  4. or download this
        split;
    
  5. or download this
        perl -01512 -e
    
  6. or download this
     
        $ perl -01512 -e 1
        Unrecognized switch: -2  (-h will show valid options).
        $
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (5)
As of 2024-04-19 23:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found