Help for this page

Select Code to Download


  1. or download this
    $SIG{__WARN__}=sub {
        warn substr($_[0],0,100)
    ...
    $SIG{__DIE__}=sub {
        die substr($_[0],0,100) # unless in eval ...
    };
    
  2. or download this
    my $null=File::Spec->devnull();
    open STDERR,'>',$null or die "Could not open '$null': $!";
    # no close() before open(), open() takes care of closing STDERR at the
    + right time