You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
309 B
19 lines
309 B
14 years ago
|
#!/usr/pkg/bin/perl
|
||
|
|
||
|
binmode STDIN;
|
||
|
binmode STDOUT;
|
||
|
|
||
|
while (1)
|
||
|
{
|
||
|
my $byte = getc;
|
||
|
last unless defined($byte);
|
||
|
$byte = ord($byte);
|
||
|
$a = $byte & 0x08;
|
||
|
$b = $byte & 0x10;
|
||
|
$byte = $byte & 0xe7;
|
||
|
$byte = $byte | 0x08 if ($b);
|
||
|
$byte = $byte | 0x10 if ($a);
|
||
|
printf "%c", $byte;
|
||
|
}
|
||
|
|