Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
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 making s'mores by the fire in the courtyard of the Monastery: (5)
As of 2015-07-04 00:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (57 votes), past polls