<font size=2 face="sans-serif">I've used:</font>
<br><font size=2 face="sans-serif">&nbsp; my $ident = 'web ';</font>
<br><font size=2 face="sans-serif">&nbsp; $ident .= &quot;$DBNAME &quot;
if $DBNAME;</font>
<br><font size=2 face="sans-serif">&nbsp; for my $level ( 0 .. 5 ) {</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; #my ($package, $filename,
$line) = caller($level);</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; my ($package, $filename,
$line, $subroutine, $hasargs,</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; $wantarray,
$evaltext, $is_require, $hints, $bitmask)</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; = caller($level);</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; last unless $filename
and $filename =~ /\w/;</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; $subroutine = $evaltext
if $subroutine eq &quot;(eval)&quot;;</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; $package = ($package eq
&quot;main&quot; ? &quot;&quot; : $package . &quot;::&quot;);</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; $filename =~ s|\.\./|/|g;</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; $filename =~ s|//|/|g;</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; $ident .= &quot;called
from $package&quot; . &quot;$filename($subroutine line: $line) &quot;;</font>
<br><font size=2 face="sans-serif">&nbsp; } &nbsp; &nbsp;# for level</font>
<br>
<br><font size=2 face="sans-serif">This is to create a preamble to an error
msg for use w/ syslog but the idea is to walk back the caller stack a ways
in case A called B called C called D (who's outputting the mgs).</font>
<br>
<br><font size=2 face="sans-serif">a</font>
<br><font size=2 face="sans-serif">-------------------<br>
Andy Bach<br>
Systems Mangler<br>
Internet: andy_bach@wiwb.uscourts.gov<br>
Voice: (608) 261-5738; Cell: (608) 658-1890<br>
<br>
 A host is a host, from coast to coast<br>
and everyone talks to a host that's close<br>
unless of course, the host that's close<br>
is busy, hung or dead. -- DCP</font>