#!/usr/bin/perl # simple shell for (;;) { print '(',join(', ',@result),') ?'; last unless $input = ; $? = ''; $@ = ''; $! = ''; @result = eval $input; if ($?) { print 'status=',$?,' ' } if ($@) { print 'errmsg=',$@,' ' } if ($!) { print 'errno=',$!+0,': ',$!,' ' } }