mmittiga17 has asked for the wisdom of the Perl Monks concerning the following question:
my %recs =(); while (<inData>) { chomp; $line = $_; next unless ($line =~/^DTL/); $CUSIP = substr $line, 4, 12; $CUSIP =~s/\s+//g; $ACTNUM = substr $line, 240, 9; $CSH_TRD_BAL = substr $line, 64, 17; $CSH_TRD_BAL2 = substr $line, 64, 17; $recs{$ACTNUM} += $CSH_TRD_BAL2 ; &GetCusip("$CUSIP"); print "$recs{$ACTNUM} $CSH_TRD_BAL2 $CUSIP $ACTNUM\n " if ($CUSCOD +E eq 'MMKS'); }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: combining values from multiple lines
by kennethk (Abbot) on Apr 14, 2009 at 15:32 UTC |