... this was not what I wanted :( I was hopeing for output that looked like this ...$ cat text_ob.pl #!/usr/bin/perl -w use strict; my $randChar = sub () { return chr(int(rand(26)) + 65); }; while (<DATA>) { #s/(\w)/(??{$randChar->()}/g; s/(\w)/$randChar/g; print $_; } __DATA__ ABCDEFG $ ./text_ob.pl CODE(0x1014078c)CODE(0x1014078c)CODE(0x1014078c)CODE(0x1014078c)CODE(0 +x1014078c)CODE(0x1014078c)CODE(0x1014078c)
Am I on the right track or way off?HJAxQPv
| Plankton: 1% Evil, 99% Hot Gas. |
In reply to s/\w/random character/g by Plankton
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |