Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: don't get bit by split.

by akm2 (Scribe)
on Mar 21, 2001 at 21:40 UTC ( [id://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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://66069]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others about the Monastery: (7)
As of 2024-09-17 21:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    The PerlMonks site front end has:





    Results (22 votes). Check out past polls.

    Notices?
    erzuuli‥ 🛈The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.