- or download this
my ($k, $v);
$v =~ /C5$/ and print "$k $v\n" while ($k, $v) = each %tapes;
$v =~ /P5$/ and print "$k $v\n" while ($k, $v) = each %tapes;
- or download this
my (@C5, @P5);
while (my ($k, $v) = each %tapes) {
...
: push @P5, "$k $v\n";
}
print @C5, @P5;
- or download this
my @P5;
while (my ($k, $v) = each %tapes) {
$v =~ /C5$/ ? print "$k $v\n" : push @P5, "$k $v\n";
}
print @P5;