Basically, my question is this except for perl rather than PHP.
I know warn() manages it, but then again warn() is core perl, so I'd understand if it weren't generally possible.
Addendum (in case that link fails eventually)
have a function
sub logm
{
my ($msg, $line_no) = @_;
# ...
}
I would like to include __LINE__ (and __FILE__, but that's not necessary), but don't want to include it as a parameter each time as I currently do.
# This is attrocious
logm "That file handle is now closed", __LINE__;