#!/usr/bin/perl -- use strict; use warnings; use List::Tuples qw' tuples '; Main( @ARGV ); exit( 0 ); sub Main { my %hash ; for my $tuple ( tuples [2] => rat => "acggghhh", mat => "dhhdhdhdh", rat => "fhhfjfjj", rat => "dggdgdgdg" ) { $hash{ $tuple->[0] } .= $tuple->[1]; } while ( my( $key, $value ) = each %hash ) { print "$key and $value \n"; } } __END__ rat and acggghhhfhhfjfjjdggdgdgdg mat and dhhdhdhdh
In reply to Re^2: question related to hash
by Anonymous Monk
in thread question related to hash
by viktor
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |