I'm not using grep
my ($name) = seekName($id) print "$name\n"; sub seekName { my ($id) = $_[0]; open (IN, "<:utf8", "names.txt") or die "Can't open: $!"; seek In, $id, 0; my $line = <In>; return $line; }
Output just gives a bunch of 1's
In reply to Re^2: Return Value from sub
by Dr Manhattan
in thread Return Value from sub
by Dr Manhattan
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |