in reply to Differences between normal hashes and DBM tied hashes

You're storing a reference in your database, which is just the memory address of the list. That's not significant once you read it. What would it be pointing to?

You need to store the data itself in the file:

$TEST{$key} = join( "|", @filedata )
then you'll be storing the actual data that you want.

And of course, you could improve the efficiency a bit by not splitting, stripping and rejoining, like so:

s/^([^|]+)|//; my $key = $1; $TEST{$key} = $_;
You're finding the first sequence up to the pipe, and stripping it off, but you're then stashing what you stripped into $key.

xoxo,
Andy
--
Throw down the gun and tiara and come out of the float!