in reply to 'perl -e' and '__DATA__' What's wrong?
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.$ perl -le 'print $0' -e
Maybe you could use
$ perl -e 'print <<EOT; example data EOT '
instead.
--shmem
_($_=" "x(1<<5)."?\n".q·/)Oo. G°\ /
/\_¯/(q /
---------------------------- \__(m.====·.(_("always off the crowd"))."·
");sub _{s./.($e="'Itrs `mnsgdq Gdbj O`qkdq")=~y/"-y/#-z/;$e.e && print}
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: 'perl -e' and '__DATA__' What's wrong?
by Skeeve (Parson) on Dec 07, 2007 at 09:57 UTC | |
by johngg (Canon) on Dec 07, 2007 at 14:29 UTC | |
by Skeeve (Parson) on Dec 07, 2007 at 14:47 UTC | |
by duff (Parson) on Dec 07, 2007 at 14:53 UTC | |
by Skeeve (Parson) on Dec 07, 2007 at 15:15 UTC | |
|