<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
</head>
<body bgcolor="#ffffff" text="#000000">
Hi all,<br>
<br>
I am trying to introduce you to a Perl function '<b>caller</b>' which
most of us didn't pay attention to. I do remember I used it long back,
but never used for last 4 years.<br>
<br>
caller is a perl built-in function. It returns the context of function
call in any subroutine.<br>
<br>
Syntax: <br>
<br>
<pre class="verbatim"><tt><span class="s">(</span><span class="i"> $package</span><span
 class="cm">,</span> <span class="i">$filename</span><span class="cm">,</span> <span
 class="i">$line</span><span class="cm">,</span> <span class="i">$subroutine</span><span
 class="cm">,</span> <span class="i">$hasargs, </span><span class="i">
  $wantarray</span><span class="cm">,</span> <span class="i">$evaltext</span><span
 class="cm">,</span> <span class="i">$is_require</span><span class="cm">,</span> <span
 class="i">$hints</span><span class="cm">,</span> <span class="i">$bitmask</span><span
 class="cm">,</span> <span class="i">$hinthash</span></tt><span
 class="s"><tt> ) = caller(1);</tt>

</span></pre>
<p><span class="s">The only expression it takes is an integer. Value 1
means, returns the details of the function called current function.<br>
</span></p>
<p><span class="s">For more details, you may read
<a class="moz-txt-link-freetext" href="http://perldoc.perl.org/functions/caller.html">http://perldoc.perl.org/functions/caller.html</a><br>
</span></p>
<p><span class="s"><br>
May be at some point you may need it :)<br>
</span></p>
<p><span class="s">Thanks and Regards<br>
Varghese Chacko<br>
</span></p>
</body>
</html>