Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
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 exploiting the Monastery: (3)
As of 2024-04-23 01:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found