> This works great, except when I do:
>
> for (keys %codes_hash) {
> print "$_|$codes_hash{$_}\n";
> }
>
> for my own confirmation, I'm getting a blank line in the
> printout. I re-checked my config file and made sure there
> was not an extra blank line at the end of the file. Do you
> have any ideas why it would print out a blank line?
Yes. See Edit below.
>
> Here's my entire test code:
>
> my $test_file = "test.codes";
> my %codes_hash = ();
Change this to my %codes_hash;
the = () is adding an empty key/value
HTH
DMuey
>
> open (TEST,"< $test_file") or die "Cannot open $test_file";
> while (<TEST>) {
> my ($code, $id) = split /\|/;
> $codes_hash{$code} = $id;
> }
>
> for (keys %codes_hash) {
> print "$_|$codes_hash{$_}\n";
> }
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]