programming-examples/perl/Hash/Adding elements to a hash.pl
2019-11-15 12:59:38 +01:00

5 lines
223 B
Perl

%hash = ( width => '300', height => '150' );
$hash{ 'color' } = 'blue';
print "\$hash{ 'width' } = $hash{ 'width' }\n";
print "\$hash{ 'height' } = $hash{ 'height' }\n";
print "\$hash{ 'color' } = $hash{ 'color' }\n\n";