Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re^2: awk like question in perl

by drock (Beadle)
on Aug 11, 2004 at 21:13 UTC ( [id://382095]=note: print w/replies, xml ) Need Help??


in reply to Re: awk like question in perl
in thread awk like question in perl

ok so how would I use this against a perl script ? is it
perl -na script.pl 'print "@F[0,1,5]\n"'

Replies are listed 'Best First'.
Re^3: awk like question in perl
by Aristotle (Chancellor) on Aug 11, 2004 at 21:31 UTC

    No. You'd either pipe the output of one script through the other:

    perl script.pl | perl -nae'print "@F[0,1,5]\n"'

    which is the same as doing it with awk.

    Or you'd have to edit script.pl to change the statements that print its output to do what you want.

    Makeshifts last the longest.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (5)
As of 2024-04-19 04:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found