Help for this page
while (my $line = <$fh>) {
while (defined( my $line = readline($fh) )) {
if (my $x = func()) { print "$x accesible here"; ... print "and also here: $x"; }