or download this
#!/usr/bin/perl
$/=\1;%p=('>',sub{$p++},'<',sub{$p--},'+',sub{$p[$p]++},'-',sub{$p[
$p]--},'.',sub{print chr$p[$p]},',',sub{$p[$p]=ord<>},'[',sub{&c});
sub p{exists$p{$_}&&&{$p{$_}}}p while<>;sub c{push@c,<>.!1until$c[@
c-1]eq']';do{p for@c}while$p[$p]}