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.