Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re^3: How does $. work in one liner? -- it does not reset automatically

by Discipulus (Canon)
on May 29, 2016 at 20:07 UTC ( [id://1164460]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    #cat a.txt
    a file line 1
    ...
    b file line 1
    b file line 2
    b file line 3
    
  2. or download this
    #perl -ne "print if 1..2" a.txt b.txt
    a file line 1
    a file line 2
    
  3. or download this
    #perl -ne "print if 1..2; close ARGV if eof" a.txt b.txt
    a file line 1
    a file line 2
    b file line 1
    b file line 2
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (6)
As of 2024-04-23 10:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found