Help with perl script

Help with perl script

Post by Chi Kwong Cheun » Thu, 29 Jul 1999 04:00:00


I have the following perl script :

while ( <> ) {
        print $_ ;


print ( "Enter Something here ; " ) ;
$choice = <STDIN> ;

If a cat a file through this script, it will not prompt me for the
choice, what can I do so that I can input from the keyboard ?

Chi Kwong


1. Help Using Perl Scripts

When I try to place scripts on a Unix server I cotinually get these ^M characters.  At
first I thought that this was only when I authored them on my PC. But it seems to happen
whenever I download them from a script library.  Anything that goes through my PC gets
these ^M (line breaks).  For a while I was just using vi to click them out.  But now
I am trying to use for instance L.Stein's CGI.PM and its just too long for me to hobble
my way through the document taking out these line-breaks.  Does anyone beside me have
these problems?  There seems to be no way around it but none of the books that I read
seem to mention this, even as an inconvenience.  

P.S. Please respond to my E-Mail account if possible.

Joshua Micah Marshall

2. DOS & WIndows to Linux

3. Help with perl script.

4. Peculiarity in this script

5. need help with Perl script for serial port

6. time function in UNIX

7. Tr: dizum persons help -lcs perl scripts

8. Problem with make dep - compiling kernel

9. NEED Help whit perl scripts and telnet

10. Unix Server .forward File Help Needed (Perl Script Related)

11. Execute a sh script under perl and sh: sh script; perl script?

12. Apache-perl: place html files and perl scripts in the same location

13. ksh 1, perl 2 - ksh or perl for scripting?