http://qs321.pair.com?node_id=243499


in reply to detecting a pipeline on STDIN

You say:

using this loop without knowing there is a pipeline will cause the program to hang till it gets an EOF on STDIN (which it obviously won't get).

Duh? This:

ls|perl -e 'while (<STDIN>) {/1/ and do{print}}'

works as expected (prints only the lines of the output of ls which contain a 1). OK, you need to do different processing in the case of a pipeline, but you will still get EOF.

Just nitpicking...

-- 
        dakkar - Mobilis in mobile