in reply to Re: Help with argument to a subroutine
in thread Help with argument to a subroutine

Or

while (<STDIN>) { chomp; last if !$_; # or other suitable termination test $header .= "$_\n"; }

DWIM is Perl's answer to Gödel