Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re^2: join program in one-liner

by bmann (Priest)
on Aug 19, 2005 at 22:16 UTC ( [id://485318]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    #        1         2         3         4
    #23456789012345678901234567890123456789012345
    perl -lne'$a[$.].=$_;$.=0if eof}{print for@a'
    
  2. or download this
       $. is reset when the filehandle is closed, but not when an open
       filehandle is reopened without an intervening close().  For
       more details, see "I/O Operators" in perlop.  Because "<>"
       never does an explicit close, line numbers increase across ARGV
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (4)
As of 2024-03-29 16:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found