I'm having a problem with Getopt. If I pass the -p option the script uses the proxy as it should. If i pass it -p -o it ignores the unless (exists($args{o})) and writes to $outfile anyway. Any idea why it's doing that?
dan use LWP::Simple; use Getopt::Std; getopt('o:p', \%args); if (exists($args{p})) { $ENV{http_proxy} = "http://localhost:8080"; } my $outfile = "foo.out"; my $file = get("http://some.domain.com/foo.txt") || die "can't download data file. perhaps you need to use the proxy flag.\n"; @t=(split/\n/,$file); unless (exists($args{o})) { open STDOUT, ">$outfile" or die "can't open $outfile\n";} -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]