Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
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 the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (5)
As of 2016-10-01 10:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Extraterrestrials haven't visited the Earth yet because:







    Results (575 votes). Check out past polls.