in reply to Re: what is the return value
in thread what is the return value

Whereas, and TIMTOWTDI:
#!/usr/bin/perl use strict; use warnings; use 5.016; # Modified from parent and MidLifeXis' 1043331 open my $in, '<', "a.txt"; print firstline("b.txt"); sub firstline { say "at_: @_"; my $file = shift; my $retval = open (my $FH, '<', $file ); $retval && return scalar <$FH>; # no close() required }
prints:
at_: b.txt from b

If you didn't program your executable by toggling in binary, it wasn't really programming!