--- "McCormick, Rob E" <[EMAIL PROTECTED]> wrote:
> 
> print RESULT grep { ! /_vti_cnf/ } <INFO>;
> 
> # so that could be read as print to the output filehandle the result
> of the input file handle filtered by grep.....

Exactly, and because grep is a list context, the one statement prints
the entire set of matching records from the input file.

The only real caveat is that you might not want to do this sort of
thing with a very large file, because if I'm not mistaken, grep() will
build the entire array in memory before passing it to print.

> wow -  pretty concise line there....works well.

Thanks. I was proud of it, lol...
 
> I'll need to look up $0 (perldoc perlvar:  Contains the name of the
> file containing the Perl script being executed. )

Exactly. Die puts file and line if you don't end your args with a
newline, though. =o)

Paul

__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices
http://auctions.yahoo.com/

Reply via email to