http://www.perlmonks.org?node_id=118647

This is my first posting, and a couple of things caught my eye in one night. First of which is uncovering the language BrainF*** (yup, very Anglo-Saxon name, that). Thinking, I realized just how easy it would be to make an interpreter for that language. Dreadfully simple actually, so I can't really take pride it. But, I would like feed back. This works fine on all known good BF programs I can find, however on the '99 Bottle of Beer' program, it gets to 91 bottles, and hangs, spiking the CPU. Any ideas how to fix I would like to here. Getting the obfu to look good is damn near impossible. Are there any programs to assist with that to get those 'Perl Artist' look to them? (See Swamp Thing below. *drool*)

Here's the code:

<-----Cut Here------>

#!/usr/bin/perl #BrainF*** interpreter. Give filename as arguement, or #reads from STDIN s''while(<d>){s/ [^\<\>\[\]\.\,\+\ -]//g ;$a.=$_ ;}$_=$a;$,=0;@,= ();d y/\<\ >\[\]\ +\-\.\, /zbxu_qs k/; s/z/\$,-- \;/g; s/b/\$,++\;/g;s/x /while(\$,[\$, ]!=0){/g;s/u/}/ g;s/_ /\$,[\$, ]++; /g; s/q/\$ ,[\$ ,]-- ;/g; s/s/ pridntdf"%c",\$, [\$, ];/g;s/k/gdetc \$,[ \$,];/g;edvad l;';s [\s|d]$$g; eval
<-----Cut Here----->Link for BrainF*** scripts:Here

Toodles