Solved

perl not reading right??

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

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
perl script help 12 101
stftime format 4 51
Perl Script - Remove column of data based on column value 2 48
Migrate OTRS to newest version. 1 303
Email validation in proper way is  very important validation required in any web pages. This code is self explainable except that Regular Expression which I used for pattern matching. I originally published as a thread on my website : http://www…
There are many situations when we need to display the data in sorted order. For example: Student details by name or by rank or by total marks etc. If you are working on data driven based projects then you will use sorting techniques very frequently.…
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…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…

707 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

18 Experts available now in Live!

Get 1:1 Help Now