Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: pattern match on entire file

by claree0 (Hermit)
on Nov 14, 2001 at 18:52 UTC ( [id://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?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (5)
As of 2025-06-25 08:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.