in reply to File transfer template script

I do something similar with control files. For instance. *process*version : 1.0 *process*tcpPort : 7500 *process*httpPort : 7580 It sounds to me like you would want something like *filename*transferProto : ftp *filename*destMachine : hostname etc. The following code is what was suggested to me for populating the hash
local $Data::Dump::Purity = 1; local(*FILE); open (FILE,"$ControlFile") or die print "Could not open control file + : $ControlFile\n"; my %hash; # Parse the whole file then later on get vars based # on avaible process. while( <FILE> ) { chomp($_); next, if (index($_,'#') >= 0); next, if (index($_,'!') >= 0); if ( (index($_,$process) >= 0) ) { print "$_ \n", if ($verbose); my ( $front, $back ) = split /\s*:\s*/; $front =~ s/^\*//g; my @keys = split /\*/, $front; eval( '$hash' . ( join '', map { "{'$_'}" } @keys ) . "=" . Dumpe +r $back ); } } close FILE; return \%hash;