Solved

perl not reading right??

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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Perl for loop for 2000 ms 7 105
compress files in RAR using perl 13 84
Need Helping Editing Perl Script for PowerChute Network Shutdown 3 87
Perl tar error 8 67
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…

827 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