in reply to Re: Re: Merging files
in thread Merging files

As for number one, that's just throwing away the first line. It's just the normal readline diamond operator in void context (technically the scalar is superfluous, but I put it in out of habit). The return value is being discarded rather than being saved anywhere (my $toss = <CUR> would have done just the same thing with a (useless) temporary).

As for the data structure, it's a hash of hashes. The top level hash (%data) has keys that are the primary key from your data file (the names), and the corresponding value is a hash of key/value pairs from the various data files. Add something like the following to the end of the program and you can see what it looks like:

... use Data::Dumper qw( Dumper ); print Dumper( \%data );

See also perldoc perldsc.

Replies are listed 'Best First'.
Re: Re: Re: Re: Merging files
by ellem (Hermit) on Oct 27, 2001 at 05:16 UTC
    one last time, thank you! I adjusted the code to meet my actual files and after a few typos I made/repaired it works exactly as expected. Once it was running on my data I could see what the keys were. I am working on your update now and after a quick trip to perldoc I'm set. You rock. thanks!
    --
    lmoran@wtsgSPAM.com
    print "\x{263a}"