use warnings; use strict; my %age = ( years => 5, months => 0, weeks => 2, days => 0, ); for (sort keys %age) { print "$_ = $age{$_}\n" if $age{$_}; } __END__ weeks = 2 years = 5
In reply to Re: Printing based on values?
by toolic
in thread Printing based on values?
by Douglas0028
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |