Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
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 examining the Monastery: (6)
As of 2014-09-21 07:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (167 votes), past polls