* Chris Devers <[EMAIL PROTECTED]>
> Putting everything together, try something like this:
> 
>    #!/usr/bin/perl -wT

# clean up env for taint mode
sub BEGIN {
  delete @ENV{qw(IFS CDPATH ENV BASH_ENV)};
  $ENV{'PATH'} = '/bin:/usr/bin';
}

>    use strict;
>    use CGI::Carp qw[ fatalsToBrowser ];
> 
>    print "Content-type: text/html\n\n";
>    print "Hi";
> 
>    open(FILE,">hello.txt") || die("Cannot Open File: $!");

I find '||' far less readable than 'or', and far more likely to cause
precedence problems. Though I do write fairly () free Perl code.

>    print FILE "Hello";

# proper error checking on close of write to file
close FILE or die "Problem Writing File: $!";

Reply via email to