Zaxo was on the money with readline() - all i needed was to get underneath the abstraction of the <FH> operator.
The spaceship operator (<>) is just a wrap around the readline function. You can get the same behaviour like this:
sub next_line { return scalar <FH>; }
Another remark, it might be worth setting $/ before using readline. That way you don't get unexpected behaviour if someone fiddled with it. So put something like this at the start of your sub:
local $/ = "\n";
-- Hofmator
In reply to Re3: need nextline() sub
by Hofmator
in thread need nextline() sub
by mutagen
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |