Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: perl -n seemingly eating a line of input

by shmem (Chancellor)
on May 01, 2017 at 11:42 UTC ( [id://1189254]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    perl -MO=Deparse -n -e '@a = <>; END{ print @a; } '
    LINE: while (defined($_ = <ARGV>)) {
    ...
        }
        ;
    }
    
  2. or download this
    echo -e '55\n44\n33\n22\n11\n' | perl -n -e '@a = ($_,<>); END{ print 
    +@a; } '
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (3)
As of 2024-04-26 02:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found