Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: Printing all lines of a file using a perl one liner

by Util (Priest)
on Sep 28, 2011 at 21:56 UTC ( [id://928435]=note: print w/replies, xml ) Need Help??


in reply to Printing all lines of a file using a perl one liner

Add the -w flag to turn on warnings (-wne instead of -ne).
This might help you see that you are using $a1 $a2 $a3 where you probably meant to use $a[1] $a[2] $a[3].

Update: I see that I misread your post, because you did not put your code into < code >...</ code > tags. This is making $a[1], etc display incorrectly in our browsers.

Update2: I give you points for trying for code tags, even though it went awry. The "preview" button is your friend! (and I need to read more slowly )

Replies are listed 'Best First'.
Re^2: Printing all lines of a file using a perl one liner
by la (Novice) on Sep 28, 2011 at 22:29 UTC
    thanks for the tips!

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (6)
As of 2024-04-18 08:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found