On Fri, 2009-01-16 at 17:51 +0000, Andy Smith wrote:
>    nope, its a binary executable. As I mention it works if placed in  
> (or a link is placed in) /usr/bin so there's definately a difference  
> of environment. The fact www doesnt have a shell or home dir makes
> it  
> an odd one. Odd, anyway, if Perl isnt picking up any shell PATH info  
> from anywhere special its going to be a purely UNIX issue,
> 

Perl can only change the PATH thru $ENV{PATH}.  If that's not in its
code, it doesn't change.  Have you looked at the actual PATH?

#!/usr/bin/perl

use strict;
use warnings;

use CGI::Pretty qw( :standard :xhtml );
use CGI::Carp qw( fatalsToBrowser );

print header();

my @rows = ();
for my $var ( sort keys %ENV ){
  push @rows, Tr(
                th({ -style=>'font-weight: bold; text-align: right; ', }, $var 
),
                td({ -style=>'padding-left: 1em; ', }, $ENV{$var} )
              );
}
print start_html( '%ENV' );
print table( @rows );
print end_html();


-- 
Just my 0.00000002 million dollars worth,
  Shawn

Programming is as much about organization and communication
as it is about coding.

"It would appear that we have reached the limits of what it is
 possible to achieve with computer technology, although one should
 be careful with such statements, as they tend to sound pretty silly
 in 5 years."
   --John von Neumann, circa 1950


-- 
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to