on Mon, 06 May 2002 10:54:36 GMT, [EMAIL PROTECTED] (Martin A. Hansen)
wrote: 

> sub read_recordfile
> {
>    my $records;
> 
>    {
>         local ($/) = undef;
>         open SOURCE, $recordfile or die "Can't open file: $!";
>         $records = eval <SOURCE>;
>         die $@ if $@;
>         close SOURCE;
>    }
> 
>     return $records;
> }

This looks OK to me. Against your original data, this prints (lines 
wrapped):

debugdebugdebugdebugdebugdebugdebugdebugdebugblehdebugdebug
debugdebugdebugdebugdebugdebug

as expected. (The word 'debug' is printed 17 times, exactly the 
number of subkeys you have.) Note that you cannot expect the subkeys 
to come out in the same order as you put them in your recordfile. 
Hashes by definition have no specific order.

Note that you are only printing values, not keys, and the only value 
you have defined is the 'bleh' of subkey 'mt'. You might want to 
include the (sub)keys themselves, and some newlines in the printout, 
to keep an overview of the situation. 

-- 
felix

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

Reply via email to