Single quotations? 
Those are for Unix/Linux perl only 

For windows we have to stick to double  qoutation marks
--well that's what I remmeber from quigley's book (Perl by example)

:o)

-----Original Message-----
From: renard [mailto:[EMAIL PROTECTED] 
Sent: Saturday, March 12, 2005 2:15 PM
To: Perl Beginners List
Cc: Gomez, Juan
Subject: Re: Executing perl code on the command line

Hi,

perl -e "print qq(Hello\n)"  works fine for me.

What does not work is : perl -e 'print qq(Hello\n)'


----- Original Message -----
From: "Gomez, Juan" <[EMAIL PROTECTED]>
To: "renard" <[EMAIL PROTECTED]>; "Perl Beginners List" <beginners@perl.org>
Cc: "Bakken, Luke" <[EMAIL PROTECTED]>;
<[EMAIL PROTECTED]>
Sent: Saturday, March 12, 2005 10:40 AM
Subject: RE: Executing perl code on the command line


> Hi !!!
>
> For me the line work here:
>
> C:\>perl -e "print qq(Hello\n)"
> Hello
>
> C:\>perl -e"print qq(Hello\n)"
> Hello
>
> Can it be that you type it wrong?
> Or check your perl version
>
> C:\>perl -v
>
>
>
>
> -----Original Message-----
> From: renard [mailto:[EMAIL PROTECTED]
> Sent: Saturday, March 12, 2005 9:24 AM
> To: Perl Beginners List
> Cc: Bakken, Luke; [EMAIL PROTECTED]
> Subject: Re: Executing perl code on the command line
>
> Thank you.  your methods work fine.
>
> I do wonder ... I have seen and tried command line perl code examples 
> from this mailing list that did not have quotes for print statements.
>
> On my computer they did not work.. Is this specific to Windows XP and 
> ActivePerl? Or was it untested code?
>
> PS: using single quote around the perl code fails...need to use double 
> quotes.
>
> ----- Original Message -----
> From: "Bakken, Luke" <[EMAIL PROTECTED]>
> To: "renard" <[EMAIL PROTECTED]>; "Perl Beginners List" 
> <beginners@perl.org>
> Sent: Friday, March 11, 2005 10:52 AM
> Subject: RE: Executing perl code on the command line
>
>
>> I am unable to execute a statement like --   perl -e '<perl code>' --
>> I always get this response: Can't find string terminator "'"
>> anywhere before
>> EOF at -e line 1.
>
> From the command line, use " " to quote your code and qq() or q() as 
> quotes inside your code:
>
> c:\>perl -e"print qq(Hello\n)"
>
>
> --
> To unsubscribe, e-mail: [EMAIL PROTECTED] For additional 
> commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> 
> <http://learn.perl.org/first-response>

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to