Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Passing values in a hash to a subroutine:

by Elihu (Novice)
on Feb 02, 2000 at 00:28 UTC ( [id://2674]=perlquestion: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
         foreach $key (keys (%hash)) {
                 replace ($hash{$key});
         }
    
  2. or download this
         sub replace {
                chomp;
                s/'/\\'/g;
         }
    
  3. or download this
         sub replace {
              chomp $_[0];
              $_[0] =~ s/'/\\'/g;
         }
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others about the Monastery: (4)
As of 2024-04-19 11:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found