Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

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

by Discipulus (Abbot)
on May 29, 2016 at 20:07 UTC ( #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? | Other CB clients
Other Users?
Others imbibing at the Monastery: (4)
As of 2021-10-15 21:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My first memorable Perl project was:







    Results (69 votes). Check out past polls.

    Notices?