Or you could do it conditionally. Prints either 2 B's or something that's not 2 B's.
#!/usr/local/bin/perl -l foreach ('b', 'bb', 'B', 'foo', 'bar', 'BB') { print m/^b{2}$/i ? "\x42\x42" : bb(); } sub bb() { while(1) { return chr(rand(100)) . chr(rand(100)) unless (m/^b{2}$ +/i); } }
In reply to Re: to be or not to be...
by Rich36
in thread to be or not to be...
by cLive ;-)
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |