in reply to What's the best method of Array function?

Hello,

You got good replies for using the <<HEREDOC. I suggest making this modification to the while loop.

while (<FILE>) { my %hash; # make a new hash and assign values # keys are DATA .. COMMENTS, and values come from # the split. @hash{qw/DATE TITLE URL COMMENTS/} = split /\|/; push @all_array, \%hash; } close(FILE);
Or, raise your wand and say:
@cols = qw/DATE TITLE URL COMMENTS/; @all_array = map{ my %h; @h{@cols} = split /\|/; \%h}<FILE>;
Aziz,,,