?
Solved

Perl -e question

Posted on 1998-11-04
7
Medium Priority
?
195 Views
Last Modified: 2010-03-04
Hi, I tried the following in UNIX. It works. Tried the same thing in Win NT, it doesn't. May I know the problem? THANKS.

perl -e 'print 1+1;'
Can't find string terminator "'" anywhere before EOF at -e line 1.
0
Comment
Question by:jaq
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
7 Comments
 
LVL 4

Expert Comment

by:martinag
ID: 1205985
perl -e "print 1+1;"
?

Martin
0
 
LVL 5

Accepted Solution

by:
b2pi earned 100 total points
ID: 1205986
Use double quotes.  NT does not treat single quotes as quotes. There is some discussion of this in the README.win32 file that comes with the standard distribution.

0
 
LVL 4

Expert Comment

by:martinag
ID: 1205987
This is the kind of things that makes you wonder what you're doing around here...

Martin
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 5

Expert Comment

by:b2pi
ID: 1205988
What do you mean?
0
 
LVL 4

Expert Comment

by:martinag
ID: 1205989
I suggested doubles instead of singles in my comment. But after all, your answer gives more details about the problem so I won't start a fight.

Martin
0
 
LVL 5

Expert Comment

by:b2pi
ID: 1205990
Actually, you might be right.  However,

1.) You did phrase yours as a question, rather than a statement.
2.) As you mentioned, I did give a few more details.

I must admit, again, that I am utterly flummoxed by the practive, observed by many (you and ozo, to name 2) of issuing comments rather than answers.  Could _someone_ explain this?

jag, in deference, please reject my answer, and allow martin to post one for the points.
0
 
LVL 4

Expert Comment

by:martinag
ID: 1205991
b2pi, whenever the user finds the solution satisfactory I will post an answer.
Very often (especially in programming) the problem depends on many things, such as OS, browser version, perl version or something in the code two pages up. If something like that makes the answer not work, then it is not an answer. Or?

I am aware that one must use double quotes in Windows 95 using my perl version, but since NT is said to be better than Windows 95 and I don't know about what perl version jag uses I was not sure that was the problem. That's why a comment and that's why a question mark.

Anyway, you may have the points. I've learned someting new about NT's shell from this and learning is the reason we're all here, right? Gee, I even answered my own comment!

jag, accept b2pi's answer if it works for you. Speaking of curiosity...are you from Sweden?

Martin
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

On Microsoft Windows, if  when you click or type the name of a .pl file, you get an error "is not recognized as an internal or external command, operable program or batch file", then this means you do not have the .pl file extension associated with …
In the distant past (last year) I hacked together a little toy that would allow a couple of Manager types to query, preview, and extract data from a number of MongoDB instances, to their tool of choice: Excel (http://dilbert.com/strips/comic/2007-08…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
Six Sigma Control Plans

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question