Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: don't get bit by split.

by akm2 (Scribe)
on Mar 21, 2001 at 21:40 UTC ( #66069=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    sub search {
        my $terms = shift;
        my $pattern = join "|", split " ", $terms;
    ...
        my @matches = grep { /$pattern/ } @names;
        return \@matches;
    }
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://66069]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (8)
As of 2018-04-21 12:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?