Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re^4: pushing multiple key-value pairs into an existing hash

by lomSpace (Scribe)
on Feb 11, 2013 at 18:22 UTC ( #1018210=note: print w/replies, xml ) Need Help??


in reply to Re^3: pushing multiple key-value pairs into an existing hash
in thread pushing multiple key-value pairs into an existing hash

I went ahead and used the map function. Did you have something else in mind?

  • Comment on Re^4: pushing multiple key-value pairs into an existing hash

Replies are listed 'Best First'.
Re^5: pushing multiple key-value pairs into an existing hash
by 7stud (Deacon) on Feb 11, 2013 at 18:35 UTC

    Did map produce the results you want? If so, post your code, then someone can tell you if there is a better way.

    By the way, map adds the key/value pairs one by one--just like a while loop.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1018210]
help
Chatterbox?
[Lotus1]: Cosmic37 if you undef $/ in a local context to a block it won't affect the global version after the block finishes
[Lotus1]: or you can just do local $/ in a block
[erix]: cool
[Cosmic37]: thank you Lotus I understand
[Cosmic37]: now I have tried another blunder - can anyone explain why I am such a dunderhead?
[Cosmic37]: if ( $line =~ /$mydt/ ) { print $line; }

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (7)
As of 2017-06-29 16:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How many monitors do you use while coding?















    Results (673 votes). Check out past polls.