Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: Re: Re: (ar0n) Re: Storing Info

by sickboy
on Jan 21, 2002 at 10:38 UTC ( #140329=note: print w/ replies, xml ) Need Help??


in reply to Re: Re: (ar0n) Re: Storing Info
in thread Storing Info

@routes=grep /$line/, @ {$rec->{'ADV'}};
i want to grep the entire %friends. Every $rec
For all people with brown hair and name starting with "j".
Either answer or go away. You think I haven't looked around?


Comment on Re: Re: Re: (ar0n) Re: Storing Info
Download Code
Re: Re: Re: Re: (ar0n) Re: Storing Info
by BrentDax (Hermit) on Jan 21, 2002 at 11:55 UTC
    Either answer or go away.

    Excuse me, but this guy went out of his way to give you a few pointers and you just insulted him. Any help is better than no help at all. Further, you probably haven't really looked at grep. If you had, the solution would quickly become obvious.

    Nobody here is going to hand you the code--you have to do it for yourself or you'll never learn. I will, however, hand you part of the code. @results=grep {SOMETHING} @friends{sort keys %friends};
    All you have to do is figure out what goes in place of the SOMETHING. It's not that difficult.

    =cut
    --Brent Dax
    There is no sig.

      I really dont understand why everybody wants to sort the keys of the hash. I mean OP didnt say he cares about the keys...
      print join "\n",map{ (CONDITION) ? join(",",values %$_) : () } values +%hash;
      But I cant seem to work out what the CONDITION should be. Maybe the OP can work it out...

      Yves / DeMerphq
      --
      When to use Prototypes?

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (2)
As of 2014-07-26 00:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (175 votes), past polls