in reply to Isn't there a print line function?

Well, I don't know about PERL[1], but in Perl I think this does what you want:

foreach (@lines) { print if /whatever/; }

or am I missing something?

[1] PERL seems to be a cut-down version of Perl that script-kiddies use to write bad CGI scripts :)

--
<http://www.dave.org.uk>

Perl Training in the UK <http://www.iterative-software.com>