Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: pattern match on entire file

by claree0 (Hermit)
on Nov 14, 2001 at 18:52 UTC ( #125313=note: print w/replies, xml ) Need Help??


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

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://125313]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (4)
As of 2022-10-06 07:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My preferred way to holiday/vacation is:











    Results (26 votes). Check out past polls.

    Notices?