Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/perl
    use strict;
    ...
            print $out $_;
        }
    }
    
  2. or download this
    #!/usr/bin/perl
    use strict;
    ...
    my %out = map { $_ => undef } qw( op0 op1 op2 op3 );
    ( open $out{ $_ }, '>', $_ or die "can't: $!\n" ) for keys %out;
    while ( $line = <> ) { print $_ $line for values %out; }
    
  3. or download this
    #!/usr/bin/perl
    use strict; use warnings;
    ...
    my %out = map { $_ => undef } @out;
    for ( @out ) { open $out{ $_ }, '>', $_ || die "Can't: $!\n" }
    while ( my $l = <> ) { print $_ $l for values %out }