Help for this page

Select Code to Download


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