good chemistry is complicated, and a little bit messy -LW |
|
PerlMonks |
Re: __DATA__ on commandline does not work?by The Perlman (Scribe) |
on Apr 10, 2010 at 19:17 UTC ( [id://834029]=note: print w/replies, xml ) | Need Help?? |
IIRC the -e switch means eval, and IMHO you cant use __DATA__ in eval. The second form you showed is completely different since you are using a shell (bash?) here-doc which is similar to execute a file. Anyway there is no big point in using __DATA__ within -e'...' since the shell offers plenty of possibilities to pipe the data into your snippet. for instance
In Section
Seekers of Perl Wisdom
|
|