Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

K_M_McMahon's scratchpad

by K_M_McMahon (Hermit)
on Jan 17, 2005 at 08:50 UTC ( [id://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
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others studying the Monastery: (3)
As of 2024-12-07 15:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Which IDE have you been most impressed by?













    Results (50 votes). Check out past polls.