i'm probably doing well known things here, but comments are appriciated:
sub a{my$a=reverse shift;$a=~y/b-z/a-y/;unshift @a,$a;}sub b{$c.=reverse shift;while(length($c)>=$b[0]){a(substr($c,0,$b[0]));$c=substr($c,$b[0]);shift@b;}}$a="ifpubotukv";$d="lfbdmifssq";@b=split(//,'74741');$a='s.'.$d.$a;while($a ne ""){b(substr($a,0,2));$a=substr($a,2);}print join(" ",@a);