FWIW: I use a very similar trick all the time in conjunction with SSI, where the polyglot ends up looking like this:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="de" lang="de"> <head> <title>foobar</title> </head> <body> <!--#exec cmd="perl -x $SCRIPT_FILENAME" --> </body> </html> <!--#if expr="0 = 1" --> #!/usr/bin/perl # generate page body here __END__ <!--#endif -->
It’s actually quite neat as a crude templating system when the script-generated part of the page has little to no variation in markup structure (f.ex. just a simple table or list).
Makeshifts last the longest.
In reply to Re: Because PHP sucks: escape to Perl.
by Aristotle
in thread Because PHP sucks: escape to Perl.
by Juerd
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |