RE: perl -e 'comand' doesn't work

2004-10-27 Thread Joseph Discenza
[EMAIL PROTECTED] wrote, on Wednesday, October 27, 2004 10:22 AM
:I am using Perl v5.6.0 623 build from ActivePerl. When I 
:  issue perl -e 'command', it should execute the command as 
:  described in the documentation.  Could anybody shed any 
:  light on this?  Thanks.

Your subject line says it all.

Single quotes don't work in the DOS shell for perl -e. Maybe someone knows
why, but it's a shell thing. You also have to use qq(..) instead of double
quotes inside your one-liners, or the shell thinks it's the end of the
command.

Good luck,

Joe

==
  Joseph P. Discenza, Sr. Programmer/Analyst
   mailto:[EMAIL PROTECTED]
 
  Carleton Inc.   http://www.carletoninc.com
  574.243.6040 ext. 300fax: 574.243.6060
 
Providing Financial Solutions and Compliance for over 30 Years
* Please note that our Area Code has changed to 574! *  



___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


Re: perl -e 'comand' doesn't work

2004-10-27 Thread $Bill Luebkert
[EMAIL PROTECTED] wrote:

> Hi, 
>   I am using Perl v5.6.0 623 build from ActivePerl. When I issue perl -e 'command', 
> it should execute the command as described in the documentation.  Could anybody shed 
> any light on this?  Thanks.
> 
> D:\Perl\bin>perl -e 'print xxx'
> Can't find string terminator "'" anywhere before EOF at -e line 1.
> 
> D:\Perl\bin>perl -e 'print xxx;'
> Can't find string terminator "'" anywhere before EOF at -e line 1.
> 
> D:\Perl\bin>perl -e "print ;"
> 
> D:\Perl\bin>perl -e "print xxx"

None of those are valid syntax in both the cmd shell and perl.

perl -e "print qq{xxx\n}"

perl -e "print 'xxx'"

PS: You should always end a line with \n to make sure it's forced out
with buffering on - so I don't recommend the seccond form.

-- 
  ,-/-  __  _  _ $Bill LuebkertMailto:[EMAIL PROTECTED]
 (_/   /  )// //   DBE CollectiblesMailto:[EMAIL PROTECTED]
  / ) /--<  o // //  Castle of Medieval Myth & Magic http://www.todbe.com/
-/-' /___/_<_http://dbecoll.tripod.com/ (My Perl/Lakers stuff)
___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


Re: perl -e 'comand' doesn't work

2004-10-27 Thread Dana Doten
gliu25,

Try this:

perl -e "print \"xxx\";

Have to escape the quotes in the code.

Have fun,

Dana

Wednesday, October 27, 2004, 10:21:38 AM, you wrote:

> Hi, 
>   I am using Perl v5.6.0 623 build from ActivePerl. When I issue
> perl -e 'command', it should execute the command as described in the
> documentation.  Could anybody shed any light on this?  Thanks.

D:\Perl\bin>>perl -e 'print xxx'
> Can't find string terminator "'" anywhere before EOF at -e line 1.

D:\Perl\bin>>perl -e 'print xxx;'
> Can't find string terminator "'" anywhere before EOF at -e line 1.

D:\Perl\bin>>perl -e "print ;"

D:\Perl\bin>>perl -e "print xxx"



> ___
> Perl-Win32-Users mailing list
> [EMAIL PROTECTED]
> To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


perl -e 'comand' doesn't work

2004-10-27 Thread gliu25
Hi, 
  I am using Perl v5.6.0 623 build from ActivePerl. When I issue perl -e 'command', it 
should execute the command as described in the documentation.  Could anybody shed any 
light on this?  Thanks.

D:\Perl\bin>perl -e 'print xxx'
Can't find string terminator "'" anywhere before EOF at -e line 1.

D:\Perl\bin>perl -e 'print xxx;'
Can't find string terminator "'" anywhere before EOF at -e line 1.

D:\Perl\bin>perl -e "print ;"

D:\Perl\bin>perl -e "print xxx"



___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs