I'm sorry that I was unclear in my response.
In your code, you use the following statement:
close LESS or die "can't close: status = $?";
... but you do not seem to want your program to die. So, a solution is to not call die instead:
close LESS;
In reply to Re^5: pipe to less crash
by Corion
in thread pipe to less crash
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |