Can you tell us some more about your goal? What happens when you run 'program | myscript.pl'? What would you want to happen? When you say "the following is processed", does it work as intended, or not?
Regarding your original question, if you run
cat somefile | perl -we 'print <STDIN>'
indeed the <> Perl construct does gather all the lines. But how can you tell the difference -- you get all of "somefile" anyway? Just the delay, if it's a long file?
To see if 'program' writes to STDERR, you could run 'program > out'. What you see was STDERR, what goes into 'out' was STDOUT.