in reply to Problems with references?

Have you dumped @record to see if it contains what you think it contains? That would be a good place to start:
use Data::Dumper; # ... print Data::Dumper->Dumper(\@record);
And are you *sure* it's hanging where you think it is? You only provide a snippet, so we'd be stabbing in the dark trying to guess why this seemingly innocent code snippet would hang.

.02

cLive ;-)