469,903 Members | 1,496 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,903 developers. It's quick & easy.

while( total_ignorance ) help

I just installed ActiveState Perl 5.8 on a Win2k system. For a sanity
check I a one line script to take input from STDIN and print. Hey it
doesn't work. If I just perform a print with some text that works. So
can someone clue me in.
So, why doesn't this print out anything:
while(<STDIN>) { print;}

or

while ($line = <STDIN>) {print $line;}
thanks
John
Jul 19 '05 #1
1 1651
so, my input problem is a result of using perl in a windows environment.
I wanted to use my script in the following manner:
dir /b | script.pl

Well in windoze this doesn't seem to work.
Is there any way to get this work as is?

thank you for your help
john

john prokopek wrote:
I just installed ActiveState Perl 5.8 on a Win2k system. For a sanity
check I a one line script to take input from STDIN and print. Hey it
doesn't work. If I just perform a print with some text that works. So
can someone clue me in.
So, why doesn't this print out anything:
while(<STDIN>) { print;}

or

while ($line = <STDIN>) {print $line;}
thanks
John


Jul 19 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by James E Koehler | last post: by
3 posts views Thread by Abhas | last post: by
23 posts views Thread by casper christensen | last post: by
22 posts views Thread by Amali | last post: by
2 posts views Thread by cJ500 | last post: by
reply views Thread by Salome Sato | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.