in reply to Re^2: Return Value from sub
in thread Return Value from sub

Context problem. Change the relevant line to:

my $name = seekName($id);

Alternate solution: return an array from your subroutine:

return ($line); Update: added the second alternate solution.