Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: Search Algorithm

by BigJoe (Curate)
on Aug 10, 2000 at 17:44 UTC ( #27286=note: print w/ replies, xml ) Need Help??


in reply to Search Algorithm

I would use the great grep command instead of your 3rd loop.
This is out of the Perl Cookbook p 114

@matching = grep { /^gnat/ } `who`
This matches anything that comes out of the who command with the regular expression ^gnat

--BigJoe

Learn patience, you must.
Young PerlMonk, craves Not these things.


Comment on Re: Search Algorithm
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (5)
As of 2015-01-30 07:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My top resolution in 2015 is:

















    Results (248 votes), past polls