LINE: while (<>) { # your program goes here } continue { print or die "-p destination: $!\n"; }