#!/usr/bin/perl use strict; use warnings; my @log="\n"; BEGIN { $SIG{__WARN__}=sub { push(@log,"@_"); }; $SIG{__DIE__}=sub { push(@log,"@_"); }; } # BEGIN END { if (@log) { print @log; }; } # END warn "a warning "; my $warning="just another warning\n"; warn $warning." "; die "death by request";
In reply to Re^2: How to determine current line executing in Script
by Anonymous Monk
in thread How to determine current line executing in Script
by bearslumber
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |