Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW

Re: password file problem

by Roy Johnson (Monsignor)
on Mar 14, 2005 at 13:46 UTC ( #439270=note: print w/replies, xml ) Need Help??

in reply to password file problem

The code tags are helpful. You can (and should) also put them around output, so that your square brackets don't get misinterpreted by PerlMonks (as they have been, here).

You cannot put the "-lne" down in the body of the program. Those are command-line options. Your program would probably work if you typed at a command line: perl -lne 'print( (split(/:/))[0] )' /etc/passwd The extra set of parentheses are necessary.

Caution: Contents may have been coded under pressure.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://439270]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (4)
As of 2018-06-24 08:18 GMT
Find Nodes?
    Voting Booth?
    Should cpanminus be part of the standard Perl release?

    Results (126 votes). Check out past polls.