in reply to pattern match on entire file

If the user input is always going to be straight text rather than a regular expression, then it may be faster to use grep.

Replies are listed 'Best First'.
Re: pattern match on entire file
by s0ttle (Scribe) on Nov 15, 2001 at 03:23 UTC
    You can shorten this:
    @file = <FILE>; $temp = join('',@file);
    to just one line:
    $file = join '', <FILE>;


    -tengo mas que aprender