Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

K_M_McMahon's scratchpad

by K_M_McMahon (Hermit)
on Jan 17, 2005 at 08:50 UTC ( #422694=scratchpad: print w/ replies, xml ) Need Help??

sub init { ### initialize globals every time site_specific configuration chan +ges undef(%s) if defined(%s);#clear out the globals if they exist $s{begin} = time(); $s{log} = $ROOT . $LOGD . "\\$s{begin}" . $LOG; $s{wrkd} = $ROOT . $WRKD; $s{work} = "WORK FILE NOT SET"; $s{xfrd} = "XFER DIR NOT SET"; $s{sync} = $SYNC_PATTERN; my $config_file = $ENV{$ITPS_BIN_ENV}."\\".$CFGF; open C, "<$config_file" or die "Cannot open external configuration file, $config_file" +; my $pattern = $TARGET_DIR; while (<C>) { chomp; if ($_ =~ m/$pattern[\s]*=[\s]*([^\s]+)/) { $s{xfrd} = $1; last; } } close C; die "No valid transfer directory path was given in the configurati +on file, $config_file\n" unless ( $s{xfrd} !~ /NOT SET/ # the name of the directory was foun +d in the config file && -e $s{xfrd} # the name identifies a directory th +at exists && -w $s{xfrd} # the directory is writable by this +process ); ### read command-line arguments foreach my $p (@ARGV) { $s{$p} = TRUE; } } #end INIT sub
Log In?
Username:
Password:

What's my password?
Create A New User
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (6)
As of 2014-10-01 06:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (389 votes), past polls