johnnywang has asked for the wisdom of the Perl Monks concerning the following question:

Hi, am looking for an interactive perl shell, anyone tried the psh at sourceforge? it hasn't changed for awhile. I've been using the "perl -d" for interactive sessions, wondering what the rest of you monks use? Thanks.

Replies are listed 'Best First'.
Re: Is there a good perl shell
by rlb3 (Deacon) on Jul 20, 2004 at 02:07 UTC
Re: Is there a good perl shell
by diotalevi (Canon) on Jul 20, 2004 at 01:10 UTC
Re: Is there a good perl shell
by Your Mother (Archbishop) on Jul 20, 2004 at 04:41 UTC

    This is a fake shell I use. It's limited in what it really does but I like it a lot for testing and playing with simple things.

    #!/usr/bin/perl -wn BEGIN { sub cl { print `clear` } # i like a clear screen sub q { exit 0 } # i like a simple exit $SIG{$_} = 'IGNORE' for keys %SIG; print "\n\tType\e[1m exit\e[0m when you are ready to stop.\n"; $history = 1; sub prompt { print "\n", $ENV{USER}, '@perl-shell[', $history++, ']>'; } prompt(); } eval; $@ ne "" and warn $@; # give perl errors back to the user prompt(); # print a fresh prompt with updated history END { print "\n\t\tBye!\n\n"; }