Hi belg4mit,
Actually I do care about white space and etc though you can't tell that from my original post. With the help I got from you helpful monks here's what I ended up with ...
$ cat text_ob.pl
#!/usr/bin/perl -w
use strict;
sub randchar { return chr int(rand(26)) + 65; }
sub randchar2 {
my $t = shift;
return chr int(rand(26)) + 65 if $t =~ /[a-zA-Z]/;
return int(rand(9)) if $t =~ /\d/;
return $t;
}
while (<>)
{
s/(.)/&randchar2($1)/ge;
print $_;
}
$ ./text_ob.pl < text_ob.pl
#!/VYX/ZEE/AOIV -M
MVV AMGMXL;
YHN DTRQSXDS { GJAHJL MMY BMO(OLTR(18)) + 70; }
FZJ EVXHJEPY7 {
KP $U = RLOFG;
VCDZBZ VOD GAU(GHOE(70)) + 67 ZF $F =~ /[E-V|D-K]/;
RPYZOA ADX(ERSW(1)) EM $E =~ /\R/;
GDQIZW $W;
}
VKSXA (<>)
{
F/(.)/&XDGFXIBL8($8)/QW;
DTMTE $_;
}
|