Pantek Library
Hosting Provided By
CybrHost
High Speed Hosting

cleaner perl printenv

From: <jidanni(at)jidanni.org>
Date: Fri Dec 21 2007 - 10:01:53 EST


/usr/share/doc/apache2-doc/cgi-examples/printenv:

  print "Content-type: text/plain; charset=iso-8859-1\n\n";

charset assumptions?

But mainly, this can be simplified to:

for (sort keys %ENV) {

$val = $ENV{$_};
$val =~ s|\n|\\n|g;
$val =~ s|"|\\"|g;

    print "$_=\"${val}\"\n";
}

-- 
To UNSUBSCRIBE, email to debian-apache-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Received on Fri Dec 21 12:40:02 2007

This archive was generated by hypermail 2.1.8 : Wed Mar 19 2008 - 02:59:22 EDT


Contact Us  Legal Notices  Order Services Online 
Pantek Home  Privacy Policy  IT news  Site Map  Pantek Library