Help for this page

Select Code to Download


  1. or download this
    %CFG = (
        'servers' => {
    ...
        },
        'temp' => 'remove me'
    );
    
  2. or download this
    # Read a configuration file
    #   The arg can be a relative or full path, or
    ...
        print(STDERR $err, "\n");
        exit(1);
    }
    
  3. or download this
    # Add last access time
    $CFG::CFG{'servers'}{'SRV1'}{'last_access'} = time();
    ...
        print(STDERR "ERROR: Failure opening log file: $!\n");
        exit(1);
    }
    
  4. or download this
    use Data::Dumper;
    
    ...
        print(STDERR $err, "\n");
        exit(1);
    }
    
  5. or download this
    perl -c my_cfg.cfg