Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: Passing Hashes to Functions

by straywalrus (Friar)
on Apr 22, 2002 at 22:37 UTC ( [id://161168]=note: print w/replies, xml ) Need Help??


in reply to Passing Hashes to Functions

This worked fine on my Slakware 7.1 box w/ perl 5.6.0
#!/usr/bin/perl some(TK=>OK,PERL=>COOL,LISP=>AWESOME); print "Done!\n"; sub some { %localhash = @_; foreach $localkey (keys (%localhash)) { print "Key: $localkey \n Value: $localhash{$localkey}\n"; } }

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (None)
    As of 2024-04-25 01:51 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      No recent polls found