http://www.focusresearch.com/gregor/psh/ threw up all sorts of errors and I couldn't use it so I wrote my own short perl shell to use instead of cmd.exe.

This is in my C:\bin\psh.bat now along with some other modules in PERL5OPT for doing stuff to Lotus Domino databases and some simple reports. I realize that this is nothing special but in some cases instead of writing loads of one-liners this is more convenient.

$ histogram count dc_all(
:     $S->GetDatabase( qw( SomeServer SomePath\\SomeDb ) ) ->AllDocuments,
:     sub { $_[0]->{'form'}[0] } )
: ;
1                                                                 1541
          :  1
Billing   :  1
IPAF      : ***************************************************** 1541
Sequential: * 57
Sites     : * 49

$ dir( "c:\\" )
: ;
 Volume in drive C has no label.
  Volume Serial Number is 3496-1C40

  Directory of c:\

 05/27/2004  03:11p             360,116 #approvers.txt#
 05/14/2004  01:56p               6,928 #cases#
 05/13/2004  12:16a      <DIR>          abc
 05/13/2004  12:06a      <DIR>          abcmidi
 05/03/2004  08:36a      <DIR>          admin
 05/27/2004  03:06p             376,241 approvers.txt
 10/14/2003  10:18a                  28 AUTOEXEC.BAT
 12/21/2001  04:29a      <DIR>          BACKUP
 05/27/2004  06:02p      <DIR>          bin
 05/14/2004  01:50p               7,079 cases
 05/14/2004  01:33p               6,873 cases~
 11/07/2003  09:46a      <DIR>          clisp
 10/14/2003  11:59a      <DIR>          cygwin
@echo off perl -MShell -e "$/=\"\n\";$|=1;while(do{print $s?\"\: \":\"\$ \"},$l= +<>){if($l=~/^;$/){@o=eval$s;if(@o){print\"@o\n\"}elsif($@){print\"$@\ +n\"}$s=''}else{$s.=$l}}"

In reply to A simple perl shell for Windows by diotalevi

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.