Beefy Boxes and Bandwidth Generously Provided by pair Networks
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??


in reply to __DATA__ on commandline does not work?

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

perl -e'print <>' <<XXX > 1 > 2 > 3 > XXX 1 2 3

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://834029]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others perusing the Monastery: (4)
As of 2024-03-30 08:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found