Solved

Perl -e question

Posted on 1998-11-04
7
151 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
  • 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 50 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
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
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

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Many time we need to work with multiple files all together. If its windows system then we can use some GUI based editor to accomplish our task. But what if you are on putty or have only CLI(Command Line Interface) as an option to  edit your files. I…
I have been pestered over the years to produce and distribute regular data extracts, and often the request have explicitly requested the data be emailed as an Excel attachement; specifically Excel, as it appears: CSV files confuse (no Red or Green h…
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…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

706 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now