>>> <[EMAIL PROTECTED]> 03/21/02 03:59PM >>> $srl_num_item is undefined in the child process, hence the error. What are you trying to do, exactly? The line
exec `thaw.pl`; is very odd---you are exec'ing the output of backticks operation, `thaw.pl` (which executes thaw.pl in a new process). Tim #################################################### You're right, I was trying to figure out what's wrong and I left exec `thaw.pl`; Here is the siuation: the following script reads the log file and starts the other scripts. Most of them need the same data from the database. I'm trying to avoid running database queries again and again by storing the query result in the hash table, freezing the hash and using the data in the child processes after thawing it. TIA - Greg ##script #!perl -w use strict; my $dir1 = "G:/Apps/Quickedi/Ib"; my $dir2 = "G:/Persona/WARDAWYG/PSCRIPTS/EDI/DBI"; #Archive recv.1 file my $recv = "arch_recv.pl"; system("$dir1/$recv"); ###### BBB ## EDI_DATA on commserver - mySQL: my $my_bbb816 = "bbb_rftc_update_mySQL.pl"; my $my_bbb850 = "bbb_po_mySQL.pl"; ## EDI DATA on NTServer - SQL: my $bbb816 = "bbb_rftc_update_SQL.pl"; my $bbb850 = "bbb_po_SQL.pl"; ##### LNT ## EDI_DATA on commserver - mySQL: my $my_lnt850 = "lnt_po_mySQL.pl"; my $my_lnt852 = "lnt_pad_mySQL.pl"; my $my_lnt860 = "lnt_po_change_mySQL.pl"; ## EDI DATA on NTServer - SQL: my $lnt850 = "lnt_po_SQL.pl"; my $lnt852 = "lnt_pad_SQL.pl"; my $lnt860 = "lnt_po_change_SQL.pl"; ##### FAs ## EDI_Data on commserver - mySQL my $all_my_997 = "997_in_mySQL.pl"; ## EDI Data on NTServer - SQL my $all_997 = "997_in_SQL.pl"; my $log_file = "log"; open(LOG, "< $dir1/$log_file") or die "can't open $dir1/$log_file: $!"; my ($count,$customer,$trans,$lnt_po,$lnt_pad,$lnt_change,$lnt_ack,$bbb_new,$bbb_po,$bbb_ack,$ack); while (<LOG>) { #$count = 0; my @fields = split/<|\*/; s/.$//; chomp; if (/^ISA/) { #ignore } elsif (/^GS/) { if ($fields[1] eq "FA") { $ack = 1; } if ($fields[2] eq "2017781300") { $customer = "LNT"; } elsif ($fields[2] eq "058127986") { $customer = "BBB"; } else { #ignore } } elsif (/^ST/) { $trans = $fields[1]; } elsif (/^SE/) { #ignore } elsif (/^GE/) { #ignore } elsif (/^IEA/) { if ($customer eq "LNT") { if ($trans eq "850") { $lnt_po = 1; } elsif ($trans eq "852") { $lnt_pad = 1; } elsif ($trans eq "860") { $lnt_change = 1; } elsif ($trans eq "997") { $lnt_ack = 1; } else { #ignore } } elsif ($customer eq "BBB") { if ($trans eq "816") { $bbb_new = 1; } elsif ($trans eq "850") { $bbb_po = 1; } elsif ($trans eq "864") { #ignore } elsif ($trans eq "997") { $bbb_ack = 1; } else { #ignore } } else { #ignore } } else { $count++; print "Counting $count: ", substr ($_, 0, 25), "\n"; } } if (defined $bbb_new) { print "Updating Carrier Facility Code.......\n"; system("$dir2/$bbb816"); system("$dir2/$my_bbb816"); } if (defined $bbb_po) { print "Entering new POs from BBB............\n"; system("$dir2/$bbb850"); system("$dir2/$my_bbb850"); } if (defined $bbb_ack) { print "997 from BBB.........................\n"; } if (defined $lnt_po) { print "Entering new POs from LNT............\n"; system("$dir2/$lnt850"); system("$dir2/$my_lnt850"); } if (defined $lnt_change) { print "Entering PO Change from LNT..........\n"; system("$dir2/$lnt860"); system("$dir2/$my_lnt860"); } if (defined $lnt_pad) { print "Entering PAD from LNT................\n"; system("$dir2/$lnt852"); system("$dir2/$my_lnt852"); } if (defined $lnt_ack) { print "997 from LNT.........................\n"; } if (defined $ack) { print "Updating 997 informatio\n"; system("$dir2/$all_997"); system("$dir2/$all_my_997"); } print STDOUT "I to by bylo na tyle (co i na przodzie)\n"; sleep 10; ###################################################### _______________________________________________ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs _______________________________________________ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs