Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: Uncommon* but Useful Perl Command Line Options

by Abigail-II (Bishop)
on Jan 29, 2004 at 00:20 UTC ( #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
Node Status?
node history
Node Type: note [id://324839]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (8)
As of 2014-09-19 17:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (143 votes), past polls