Ok, I got myself to this point and am trying to read up on hash or arrays but. I cant figure out how to access each line I need to access as I was in my code sample.
This prints out what I want via Dumper:
my $data = "GCUS.GCUS";my %userData;open(inData, $data);while (<inData
+>) { chomp;
$line = $_;
if ($line =~/^GC/){
my $ACTNUM = substr $line, 11, 9 ;
my $ref = substr $line, 0, 3 ;
push @{ $userData{$ACTNUM} }, $ref = $line;
}
}
Here is where I get stuck and cant seem to understand the perl doc:
for $ACTNUM (sort keys %userData) {
#########GCA##############
my $line = $userData{$ACTNUM}{GCA};
$ACCTNUM = substr $line, 11, 9;
$FIRM_ID = substr $line, 660, 1;
$CURR = substr $line, 661, 3;