SPUG: Piping a file to perl to execute
jazzdev at gmail.com
Thu Sep 7 14:20:16 PDT 2006
You don't need a command line switch unless
you want to pass args:
% echo 'print "hi\n";' | perl
% echo 'print "@ARGV\n";' | perl - a1 a2
On 9/7/06, David S. Patterson <david.s.patterson at usa.net> wrote:
> I'm trying to kludge together a strategy to protect some perl source code
> prying eyes (this would be on a Unix-like system).
> I'm thinking of a solution in which a simple compiled front-end program
> an encrypted text file, decodes it internally into a perl script, and then
> execs or launches the perl executable and somehow provides the decoded
> script to it. The point is that the decoded perl script must never become
> temporary file that a "casual user" could edit. I think that temporary
> files would be fine, finding and opening those is not "easy".
> Does anyone have any ideas or suggestions about this?
> Is it possible to "pipe" a file to perl and have it execute it? Can it be
> done with the right command line switch?
> e.g.: $ cat foo.pl | perl
> Seattle Perl Users Group Mailing List
> POST TO: spug-list at pm.org
> SUBSCRIPTION: http://mail.pm.org/mailman/listinfo/spug-list
> MEETINGS: 3rd Tuesdays
> WEB PAGE: http://seattleperl.org/
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the spug-list