while( total_ignorance ) help

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • john prokopek

    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


  • john prokopek

    #2
    Okay, so it is really a piping issue

    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:[color=blue]
    > 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
    >
    >[/color]

    Comment

    Working...