Help for this page

Select Code to Download


  1. or download this
    while (<IN>) { 
        my $bits = unpack("b*", $_);
    ...
            } 
        } 
    }
    
  2. or download this
    while (<IN>) { 
        my $bits = unpack("b*", $_);
        $bits =~ s[(00|11)][ $1 eq '00' ? '11' : '00']ge;
        print OUT $bits;
    }
    
  3. or download this
    $/ = \7680;
    my $x = 0;
    ...
    
    close IN;
    close OUT;
    
  4. or download this
    die "USAGE: $0 input\n" if scalar(@ARGV) < 1;
    $| = 1;
    ...
    
    close IN;
    close OUT;