I'm looking for a quick and dirty, but compatible and
reliable, way to download and run a Perl program in
one simple, cut-and-paste-able line. So far, I've come up
with is:
perl -e 'eval `lynx --source http://theurlfortheprogram/`'
Obviously, what you get at the URL is a Perl program without
HTML formatting, such as you would get if you did this:
$ ln -s perlprogram index.html
I had tried a few variations, but piping from lynx to perl,
for example, seemed to take over STDIN, rendering it
useless for user input. During some experimentation, I
discovered a similar technique used at
Ximian, where
they had
used
sh instead, but with a pipe, presumably because
their installer isn't interactive on the command line.
This is so that I can download and run a Perl program which
fixes up things to that they work (i.e PATH, .cshrc,
.bashrc) among other things, such as hauling over a kit of
standard goodies, toys, and projectiles to put into ~/bin.
The question is, is there an easier/better way?