[lug] perl question

Hugh Brown hugh at vecna.com
Sun Jun 9 18:36:16 MDT 2002


On Sun, 2002-06-09 at 19:05, j davis wrote:
> 
> 
> hello,
> 
>   I have a small perl script that can be passed 2 args. before i made
> the script take args it worked great , now that it takes args i am
> having to rewrite the scrip because everytime i request user input with..
> $foo = <>;
> it gets messed up and doesent ask for user input and just keeps going 
> assinging
> $foo odd stuff. Before user input went smooth. the request for user input is
> in a while loop nested in a else. Dont know if that makes a diff but thought
> i should mention it. If this is not enough info or just plain dumb , i'm 
> sorry.
> i will gladley post the scrip its very small.
> 
> thanks,
> jd
> 

I'm not a perlmonger by any stretch of the imagination, but I think <>
will grab  the most recently used filehandle.  You might try <STDIN> to
explicitly grab STDIN and see if that fixes things.

Hugh





More information about the LUG mailing list