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

Concerning hash operations (appending, concatenating)

by RazorbladeBidet (Friar)
on Mar 24, 2005 at 16:24 UTC ( #442097=perlquestion: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
      my %hash = ( a => 'b' );
      # do stuff
      %hash .= ( e => 'f', g => 'h', i => 'j' );
    
  2. or download this
     $hash{'e'} = 'f';
     $hash{'g'} = 'h';
     $hash{'i'} = 'j';
    
  3. or download this
      my @vals = qw( f h j );
      my $i = 0;
      $hash{$_} = $vals[$i++] foreach qw( e g i );  
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://442097]
Approved by friedo
Front-paged by kvale
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (7)
As of 2014-09-23 23:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

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











    Results (241 votes), past polls