#!/usr/bin/perl
use strict;

my $log = '/non/existence/dir/test.log';
my $msg = "test";
&write_log($msg);

sub write_log {
   my $msg = shift;
   open LOG, ">>$log" || die "Can't write to $log: $!\n";
      print LOG $msg;
   close LOG;
}

---

It doesn't die or print any error even $log did not exist.
why?

--

--beast


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to