Thank you all for the answers you guys offered.
i think i will end up using this code.
#!/usr/bin/perl
use warnings;
%alex = (
'name' => 'Alex',
'age' => '45');
%john = (
'name' => 'John',
'age' => '20');
%chaddy = (
'name' => 'Chady',
'age' => '16');
@children = (\%john, \%chaddy);
$alex{'children'} = \@children;
print "Alex children are \n "
, join("\nand ", map $_->{age}, reverse @{$alex{children}})
, "\tyears old\n";
print "Alex is $alex{age} himself\n";
instead of the one i mentioned above. much easier to understand i guess,thx Roy and thank you all once again.
|