Skip to content
The Nameless Site
@halkeye@halkeye@toot.cafeMatrixNigel

I get my own ugly code

coding1 min read

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.

© 2023 by The Nameless Site. All rights reserved.
Theme by LekoArts