in reply to gpa.pl
Update: Hey, the first time I didn't see the big 4...it was just mashed together. Neat. BTW, this can take input from a file or STDIN, formatted in any way or not at all. And it uses the rare spit() function :)chomp($_=<>);$a=$_;s/([^a-f+-]|e)//ig;s/f//ig;s/a/spit(2);/ig; s/b/print;/ig;s/c/eof;/ig;s/d/}d/ig;s/.\-//ig;$b=$_;$_=$a; s/[^abcdf]//ig;$_=length;$b=length$b;$_=$b/(2*$_);print;
|
|---|