I get my own ugly code

sub rw { my $word = "$_[0]"; $word =~ s/(.)/rc($1)/ge; $word;}
sub rc { return ((rand(1)*2+1)%2) ? lc($_[0]): uc($_[0]); }

(i don't care about efficiency or whatnot, i was just creating a simple function for a unit test, it just looks like someone threw up some letters.

Comments

arrow_back

Previous

osqdb has to be one of the worst peices of code I have seen in a while.

Next

"free laptop" facebook scam
arrow_forward
Gavin December 1989

Gavin Mogan

Hi. I'm Gavin. I'm a coder at Sauce Labs. At home I code, game, hang out, all the cool non robot things to do. #notarobot

Friends Sites