Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
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 browsing the Monastery: (10)
As of 2014-10-23 17:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (126 votes), past polls