I personally stay away from this "perl -e" syntax for a couple of reasons:
1)if the program that the -e does is "significant", I want to give it a name, make it a "real Perl" file and put it my personal library and maybe even alias it in my shell.
2) The resulting program file is executable on multi-platforms (I work on Linux and MS Windows).
So maybe my question sounds dumb, but why do you want to do that? I haven't found a good reason yet.
I am sure that we will hear how to make it work, and I also would find it interesting. In general this shell syntax problem also boggles my mind and is platform specific. I just avoid it by making a Perl executable file.
You are correct in that perl -e "print \"Hello World\"" works from the Windows command line. But a file with: print "Hello World"; works also and is a lot more clear.
In reply to Re: Running perl from java
by Marshall
in thread Running perl from java
by abramia
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |