in reply to unexpected STDIN

That's how <> and @ARGV are defined to work. This is mainly used by oneliners.

If you really want to use <> instead of <STDIN>, you will need to empty @ARGV before asking a question.

Replies are listed 'Best First'.
Re^2: unexpected STDIN
by GhodMode (Pilgrim) on Apr 30, 2011 at 07:22 UTC

    Thanks Corion. I don't have any particular preference for <> over <STDIN>. I mistakenly thought they were exactly the same. I blame tizag. I should have read I/O Operators at perldoc instead.

    Thank you.
    --
    Ghodmode
    www.ghodmode.com/blog