Here's my version. It can be used the standard 3 perl ways:
doodspeak.pl "file", cat file | doodspeak.pl and finally by using STDIN.
#!/usr/bin/perl
use strict;
while (<>) {
chomp;
exit if($_ eq "EXIT");
my %words = (
'you' => 'joo',
'yay' => 'woot',
'rock' => 'roxor',
'rocked' => 'roxored',
'defeated' => 'roxored',
'beat' => 'roxored',
'hacked' => 'haxored',
'!' => '!!!',
'hacker' => 'haxor',
'sucked' => 'suxored',
'suck' => 'suxor',
'elite' => 'leet',
'dude' => 'dood'
);
foreach my $word ( keys %words ) {
s/$word/$words{$word}/ig;
}
tr/OoIiLlEeAa/0011113344/;
s/s\b/$1z/g;
print "$_\n";
}