Solved

perl not reading right??

Posted on 2000-04-02
3
194 Views
Last Modified: 2010-03-05
i am running active perl on my win98 pc. i am also running visual perl editor to edit my scripts, i am new to perl and the problem i am having is that when i type in a code
example:

print "hello what is your name\n";
$reply = <STDIN>;
print "your reply was $reply\n";


and when i run it in msdos, the screen comes up blank, then if i type in a word, the screen runs the whole script at once using whatever i typed in, but i know that the "hello what is your name" should come up before the stdin correct??
but it doesnt, it all runs at the same time after i type a word in?

can anyone help me,

Thank you
Randor73
0
Comment
Question by:randor73
[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
  • 2
3 Comments
 
LVL 1

Accepted Solution

by:
mrachow earned 100 total points
ID: 2677786
Hi randor73,

seems to me you starting your script by
perl <scriptname.pl ??
In that case perl is simply printing your script not running it
By trying
perl yourscript.pl
you should get the behavior you expect?!

Greetings Michael
0
 

Author Comment

by:randor73
ID: 2677795
Adjusted points from 50 to 100
0
 

Author Comment

by:randor73
ID: 2677796
Thank you very much, it was indeed the problem.
0

Featured Post

Technology Partners: 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!

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 …
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…
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

705 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