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