use Carp; sub simpleopen { my ($mode, $file) = @_; my $fh; open($fh, $mode, $file) or croak $!; return $fh } my $logfile = simpleopen('>>', "$0.log"); #### use IO::File; my $logfile = IO::File->new("$0.log", 'a'); #### 2;0 juerd@ouranos:~$ perl -e'undef christmas' Segmentation fault 2;139 juerd@ouranos:~$
## use IO::File; my $logfile = IO::File->new("$0.log", 'a'); ##
## 2;0 juerd@ouranos:~$ perl -e'undef christmas' Segmentation fault 2;139 juerd@ouranos:~$