in reply to Re: question related to hash
in thread question related to hash
#!/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
|
|---|