Re: Error in command line
From: A. Sinan Unur (1usa_at_llenroc.ude.invalid)
Date: 01/30/05
- Next message: PerlFAQ Server: "FAQ 2.17 Where do I send bug reports?"
- Previous message: A. Sinan Unur: "Re: Just wondering - variables in html templates"
- In reply to: Rajendra Pai: "Error in command line"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sun, 30 Jan 2005 16:54:27 GMT
rs.pai@sbi.co.in (Rajendra Pai) wrote in news:33b0685e.0501300304.3ad5ec53
@posting.google.com:
> Hi,
>
> I have ActivePerl installed in a Windows XP Machine.
>
> When I type the following line at the command prompt (this is just an
> example):
> perl -le 'print "PRIME" if (1 x shift) !~ /^(11+)\1+$/' 19
> the response I get is:
> Can't find string terminator "'" anywhere before EOF at -e line 1.
While I find that the cmd.exe shell is fairly workable, its handling of
various quotation marks leaves a lot to be desired.
My brain has become accustomed to converting the above to:
perl -le "print q{PRIME} if (1 x shift) !~ /^(11+)\1+$/" 19
In this particular case, you cold have also done:
perl -le "print -PRIME if (1 x shift) !~ /^(11+)\1+$/" 19
if you don't mind the leading dash.
On the other hand, you are just using a one liner on the command line
Sinan
- Next message: PerlFAQ Server: "FAQ 2.17 Where do I send bug reports?"
- Previous message: A. Sinan Unur: "Re: Just wondering - variables in html templates"
- In reply to: Rajendra Pai: "Error in command line"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|