What's wrong with what you have. You can make it shorter. cut -f5 infile > outfile springs to mind. You can use split to create an anonymous array and then select the element(s) you want from it all in the print. You might call it cleaner, you would probably not call it clearer for the non initiated. The flags are -e execute, -n read line by line into $_, -l automatically deal with newlines on IO.
perl -nle 'print ((split)[4])' infile > outfile
cheers
tachyon
In reply to Re: Column help
by tachyon
in thread Column help
by mhearse
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |