Solved

perl not reading right??

Posted on 2000-04-02
3
178 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
  • 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

Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Uploading Binary Data using Perl 5 90
PERL get the value for query 4 151
perl split by | 2 99
Control Number of Log Files -Perl 7 74
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 …
A year or so back I was asked to have a play with MongoDB; within half an hour I had downloaded (http://www.mongodb.org/downloads),  installed and started the daemon, and had a console window open. After an hour or two of playing at the command …
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…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …

810 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