in reply to Explaining
Long answer, call it like this
my @lines; load_array(\@lines, "file_name"); # now do something with @lines. [download]