in reply to __DATA__ on commandline does not work?
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
perl -e'print <>' <<XXX > 1 > 2 > 3 > XXX 1 2 3
|
|---|