Mutagens
- Make regular expressions work backwards:
use overload;
BEGIN {
overload::constant qr => sub {
return reverse shift();
};
}
print "It worked!\n" if "foo" =~ /oof^/;
- Make subroutine calling case-insensitive:
sub AUTOLOAD {
no strict 'refs';
goto &{lc $AUTOLOAD};
}
sub foo {
print "It worked!\n";
}
FoO();
- Initialise all global variables to zero:
CHECK {
while (my($n,$v) = each %::) {
$$v = 0 if !defined $$v;
}
}
print "It worked!\n" if defined($any_variable)
&& $any_variable == 0;
- Everything should be printed backwards:
sub TIEHANDLE {my $x; bless \$x}
sub PRINT {
shift;
print REALOUT map scalar reverse, reverse @_;
}
open(REALOUT, ">&STDOUT");
tie *STDOUT, "main";
print "\n!dekrow", " tI"
Extensions
|