Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re^4: Hash Help

by mmittiga17 (Scribe)
on Nov 25, 2008 at 22:42 UTC ( [id://725962]=note: print w/replies, xml ) Need Help??


in reply to Re^3: Hash Help
in thread Hash Help

with this new method how can I access each ID records lines 1 - X ? Before I could do it this way:
#########REC01############## $line = $records{$id}[0]; $ACTNUM = substr $line, 2, 9 ; $TOT_AVBL_TO_PAY1 = substr $line, 32, 11; $TOT_AVBL_TO_PAY2 = substr $line, 43, 2; $TOT_AVBL_TO_PAY1 ="0" if (! $TOT_AVBL_TO_PAY1); $TOT_AVBL_TO_PAY2 ="0" if (! $TOT_AVBL_TO_PAY2); $TOT_AVBL_TO_PAY3 = join('.', $TOT_AVBL_TO_PAY1, $TOT_AVBL_TO_PAY2); $TOT_AVBL_TO_PAY = $TOT_AVBL_TO_PAY3; #########REC02############## $line = $records{$id}[1]; #########REC03############## $line = $records{$id}[2]; $MGN_FED_CALL_TOT1 = substr $line, 31, 11; $MGN_FED_CALL_TOT2 = substr $line, 42, 2; $MGN_FED_CALL_TOT1 ="0" if (! $MGN_FED_CALL_TOT1); $MGN_FED_CALL_TOT2 ="0" if (! $MGN_FED_CALL_TOT2); $MGN_FED_CALL_TOT3 = join('.', $MGN_FED_CALL_TOT1, $MGN_FED_CALL_TOT +2); $MGN_FEDSIG = substr $line, 30, 1; if ($MGN_FEDSIG eq "+") { $MGN_FED_CALL_TOT = "-" . $MGN_FED_CALL_TOT3 ; }else{ $MGN_FED_CALL_TOT = $MGN_FED_CALL_TOT3; }
Thanks!!!!

Replies are listed 'Best First'.
Re^5: Hash Help
by GrandFather (Saint) on Nov 25, 2008 at 22:52 UTC

    Look at the code. Think about the code. Think about the data structure. Examine the result from Dump. You have the answer already and it is time for you to do some thinking and just a little work. You can't expect to be spoon fed answers to every problem you have forever.

    perllol and perlref will help.


    Perl reduces RSI - it saves typing

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://725962]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (3)
As of 2024-04-20 04:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found