[EMAIL PROTECTED] wrote: > When I run command line perl (Unix or DOS) something gives me errors > (several times) as if perl is trying to send something to the shell > command line. Alternatively, it expects further input and I hit either > ^Z or ^D, but it doesn't do anything. Since this is happening both on > DOS and Unix, it must be my mistake. > > For example > > perl -pe 'print "goat \n" ' > (expects input here)
The -p switch uses a while loop so your example above is equivalent to: perl -e'while ( <> ) { print "goat \n" } continue { print }' And if no file names are provided then <> reads from STDIN. If you just want to print a string then don't use the -p switch: perl -e'print "goat \n"' Or: perl -le'print "goat"' John -- Perl isn't a toolbox, but a small machine shop where you can special-order certain sorts of tools at low cost and in short order. -- Larry Wall -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/