TOPIC: PHP for command line scripts
der.hans
plug-devel@lists.PLUG.phoenix.az.us
Mon Dec 2 22:44:02 2002
Am 02. Dec, 2002 schw=E4tzte David A. Sinck so:
> FWIW, I'd be willing to bet that if you typed in an extra arg to perl
> invocation you could get that feature too.
>
> perl -MInline::Something arbitrary.txt
http://www.perl.com/CPAN-local/modules/by-module/Inline/Inline-0.44.readme
Wow! That's ugly!
It's also opposite of what I want.
$ cat resolv.conf
<?php require "/etc/myconfigs/host.conf" ?>
domain <?php print "$domain" ?>
nameserver <?php print "$ns1" ?>
nameserver <?php print "$ns2" ?>
$
The key is to get the file to continue looking at least partially like it
normally does.
I did find an inline perl wrapper. The syntax sucked and you had to write
pseudo-perl.
ciao,
der.hans
--=20
# https://www.LuftHans.com/ http://www.TOLISGroup.com/
# "The reasons for my decision to quit were myriad, but central to the
# decision ws the realization that there are two kinds of companies:
# Good ones ask you to think for them.
# The others tell you to think like them." -- Benjy Feen