Help for this page

Select Code to Download


  1. or download this
    use Cwd;
    
    ...
    my $cwd = getcwd();
    
    # ...
    
  2. or download this
    use File::Basename;  # another core module
    
    ...
    my $script_path = ( fileparse( $0 ))[1];  # look for config file in $s
    +cript_path
    
    # (update: as peckingham points out, "dirname()" is easier)