Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much

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?

What's my password?
Create A New User
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (3)
As of 2017-09-23 09:48 GMT
Find Nodes?
    Voting Booth?
    During the recent solar eclipse, I:

    Results (272 votes). Check out past polls.