Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: What is the simplest way to print a field, as in $3 does in awk

by projekt21 (Friar)
on Oct 23, 2001 at 15:47 UTC ( [id://120754]=note: print w/replies, xml ) Need Help??


in reply to What is the simplest way to print a field, as in $3 does in awk

cat /etc/hosts | perl -ne 'print if (split(/\s+/,$_))[1] =~ localhost'
  • Comment on Re: What is the simplest way to print a field, as in $3 does in awk
  • Download Code

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (5)
As of 2024-04-23 06:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found