This will do ...
alpha_hash is u r hash...

-----------------
my %alpha_hash = ();
open(FH_D,"$d_list") || die "File opening $d_list\n";
@file_list = <FH_D>;
foreach $record (@file_list) {
        @t_array = split(/\|/, $record);
        $alpha_hash{$t_array[0]} = $t_array[1];
}
close(FH_D);




--- Tim McGeary <[EMAIL PROTECTED]> wrote:
> I'm still very green to perl, so please forgive this
> possibly stupid 
> question.
> 
> I want to setup a configuration file to have a list
> of alpha codes 
> delimiter and a unique number that will match the
> code e.g.
> 
> PACT | 23
> PART | 24
> etc
> 
> How is the best way to read such a file into my
> program (hash ?) so that 
> I can:
> a.) use the alpha codes to sort out data from
> another file
> b.) organize that data to later include that unique
> number.
> 
> The end result will be 2 files:
> 1.) list # (chronological # from the list) | unique
> code #
> 2.) list # | data
> 
> Tim
> 
> 
> -- 
> Tim McGeary
> [EMAIL PROTECTED]
> 
> 
> -- 
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 


__________________________________
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to