Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re^3: command line perl reading from STDIN

by choroba (Chancellor)
on Jan 22, 2013 at 18:02 UTC ( #1014748=note: print w/replies, xml ) Need Help??


in reply to Re^2: command line perl reading from STDIN
in thread command line perl reading from STDIN

The fourth line (i.e. the first line, in fact) is consumed by -n. See perlrun - how to execute the Perl interpreter.
لսႽ ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ

Replies are listed 'Best First'.
Re^4: command line perl reading from STDIN
by perlhappy (Novice) on Jan 22, 2013 at 18:14 UTC
    At the start, its the second line and then every fourth file after. ie line 2, 6, 8, 12 .. eof
    This is what was confusing me but I think I worked it out. See below. Thanks

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1014748]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (8)
As of 2016-12-09 08:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:













    Results (148 votes). Check out past polls.