- or download this
open(LOG, ">>$dir/$log_file") or croak "Unable to append to error log:
+ $!";
- or download this
$0 =~ '(.*[\\\/])\w+\.\w+$';
$dir = $1;
- or download this
$dir = $1 if $0 =~ m#/.*[\\/])\w+\.\w+$#;
- or download this
use File::Basename;
$dir = dirname($0);