This may not work without some tweaking, but hopefully it will at least get you started.
#!/usr/bin/perl use Getopt::Long; &GetOptions('date=s' => \$date, 'dir=s' => \$directory, 'help' => \$help); &usage if ( defined $help || !defined $date ); my $PATH = "/Ack/$date/"; my $ftpoutbound = "/homes/ftpoutbound.db"; my %hash = (); opendir (DIR, $PATH) || die print "can't open dir $PATH at line 62 : $ +!\n"; my @FileList = readdir(DIR); close (DIR); foreach $FileList(@FileList) { next if $FileList =~ /^\.\.?$/; chomp $FileList; open (FILE, "$PATH$FileList") or die ("can't open $PATH$FileList :$ +!\n"); while(<FILE>) { @Fields = split /[\|\*~]/; # EDI data? $hash{$Fields[6]}{count}++ if ( $Fields[5] eq 'ZZ' ); # EDI? } } open (File, "$ftpoutbound") or die ("can't open $ftpoutbound at line * +* : $!\n"); while (<File>) { chomp; my @fields = split /\;/; $fields[0] =~ s/\s+//; $hash{$fields[0]}{transport} = $FTP_fields[7] if defined $hash{$FTP_ +fields[0]}; } print "$_ - $hash{$_}{count} - $hash{$_}{transport}\n" for keys %hash; sub usage { print "blah blah blah\n"; exit 1; }
In reply to Re: Help on displaying the output of two arrays
by delirium
in thread Help on displaying the output of two arrays
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |