#!/usr/bin/perl
#
# Brainfuck interpreter, v9.2
# (C)2006-2022 Pegasus Epsilon <pegasus@pimpninjas.org>
# All rights reserved.
#
# 4 by 76 characters, suitable for a usenet signature.
#
# 253 bytes, only 13 bytes larger than the original brainfuck compiler.
#
# no known bugs.
#
# CHANGELOG
# =========
# v9.2 - Squeezed out another 9 bytes
# v9.1 - Squeezed out another 4 bytes, vim parser can no longer cope
# v9 - Squeezed out 8 bytes getting it back into the 4x76 range
# v8.9 - Added five bytes to fix a bug with "0" in the instruction stream
# Previous changelog lost to drive crash
#234567890123456789012345678901234567890123456789012345678901234567890123456
$q="raw 2>&1";@c=split//,join'',<>;while($_=$c[$p],/./s){/>/&&$i++;/</&&$i--
;/]/&&($p=pop@s)--;/\[/&&($m[$i]?push@s,$p:do{$_=$c[++$p]while$x+=/\[/-/]/})
;/,/&&(`stty $q`,$m[$i]=ord getc,`stty -$q`);/\./&&print chr$m[$i];/\+/&&$m[
$i]++;/-/&&$m[$i]--;$p++} # brainfuck.pl (C)2006-2022 pegasus@pimpninjas.org
#234567890123456789012345678901234567890123456789012345678901234567890123456