On Jul 25, Stephanie Stiavetti said:

>open (REZFILE, "$>>rezFile") or die "ew!  can't open $rezFile! $!\n";
>       
>       foreach (@allParams) {
>               print "$_\t";
>       }
>       print "\n\n";
>       
>       close (REZFILE);

I would check to see if the file could be closed properly.  And maybe even
check each of those prints().

  eval {
    open FILE, ">> $file" or die "can't open $file: $!";
    for (@things) {
      print FILE or die "can't print to $file: $!";
    }
    close FILE or die "can't close $file: $!";
  };

  if ($@) {
    # something broke
  }
  else {
    # things are ok
  }


-- 
Jeff "japhy" Pinyan      [EMAIL PROTECTED]      http://www.pobox.com/~japhy/
I am Marillion, the wielder of Ringril, known as Hesinaur, the Winter-Sun.
Are you a Monk?  http://www.perlmonks.com/     http://forums.perlguru.com/
Perl Programmer at RiskMetrics Group, Inc.     http://www.riskmetrics.com/
Acacia Fraternity, Rensselaer Chapter.         Brother #734
**      Manning Publications, Co, is publishing my Perl Regex book      **


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to