I know that perl reads its code from STDIN in the second case, STDIN is connected to a pipe filled by the shell. So you have a working file handle.
I guess that in the first case, the -e argument is stuffed directly into the parser, no real file handle, thus no DATA file handle, so no output.
Alexander
In reply to Re: __DATA__ on commandline does not work?
by afoken
in thread __DATA__ on commandline does not work?
by Skeeve
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |