Re: Error in command line
From: Bill Smith (wksmith_at_optonline.net)
Date: 01/30/05
- Next message: A. Sinan Unur: "Re: Just wondering - variables in html templates"
- Previous message: Alan J. Flavell: "Re: Just wondering - variables in html templates"
- In reply to: Rajendra Pai: "Error in command line"
- Next in thread: A. Sinan Unur: "Re: Error in command line"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sun, 30 Jan 2005 11:35:13 -0500
"Rajendra Pai" <rs.pai@sbi.co.in> wrote in message
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
perl -le "print qq(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.
>
> (I am getting similar error messages for 'perl -lane' type of commands
> also. The example shown above is taken from a tutorial)
>
> I am not able to figure out what is wrong. I have tried doing both web
> and group searches in google. Please help me. I am a newbie and maybe
> missing something very obvious.
Windows still requires DOS syntax in command lines.
You must use double quotes around parameters with
special characters. This prevents the use of
double quotes in perl command line commands.
In this case, single quotes around 'PRIME' would
work, but it is a good idea to use the q family
of operators within commands on the command line
because they will never be interpreted
by windows.
Bill
- Next message: A. Sinan Unur: "Re: Just wondering - variables in html templates"
- Previous message: Alan J. Flavell: "Re: Just wondering - variables in html templates"
- In reply to: Rajendra Pai: "Error in command line"
- Next in thread: A. Sinan Unur: "Re: Error in command line"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|