good chemistry is complicated, and a little bit messy -LW |
|
PerlMonks |
Re: 'perl -e' and '__DATA__' What's wrong?by shmem (Chancellor) |
on Dec 07, 2007 at 08:05 UTC ( [id://655602]=note: print w/replies, xml ) | Need Help?? |
The -e switch tells perl to treat the next argument on the command line as a script.
The __DATA__ token causes perl to re-open $0, seek to the position of the __DATA__ and leave the filehandle DATA open pointing to the contents after that line. I'm not surprised a file handle cannot be associated with text passed into perl as a command line argument. -e is no file proper. Maybe you could use
instead. --shmem
In Section
Seekers of Perl Wisdom
|
|