Help for this page

Select Code to Download


  1. 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;
    
  2. or download this
    my (@C5, @P5);
    while (my ($k, $v) = each %tapes) {
    ...
                    : push @P5, "$k $v\n";
    }
    print @C5, @P5;
    
  3. or download this
    my @P5;
    while (my ($k, $v) = each %tapes) {
        $v =~ /C5$/ ? print "$k $v\n" : push @P5, "$k $v\n";
    }
    print @P5;