Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: -n and -p suck up ARGV no matter what

by tybalt89 (Monsignor)
on Oct 21, 2016 at 21:04 UTC ( [id://1174478]=note: print w/replies, xml ) Need Help??


in reply to -n and -p suck up ARGV no matter what

This is perl, be very careful of saying "no matter what".

echo -e "one\ntwo\nthree" | perl -ne 'INIT{$tmp = shift} print "$tmp - +> $_"' 42

Replies are listed 'Best First'.
Re^2: -n and -p suck up ARGV no matter what
by mpersico (Monk) on Oct 22, 2016 at 03:01 UTC
    I knew someone would take that as a challenge. :-) Thank you.

Log In?
Username:
Password:

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

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

    No recent polls found