Ilias Lazaridis wrote:
> sub title { my ($text) = @_;
> print
> "\n---------------------------------------------------------------------
> \n";
> warn "\===== DEMO: $text =====";
> print
> "---------------------------------------------------------------------
> \n";
> }
> The above function simply prints a title with some formatting.
> I 'abuse' the "warn" statement to print the filename and the line-
> number.
> problem: the line number and the file containing the 'sub title" is
> printed.
> need: I would need to print out the line number and filenname of the
> function which CALLS "title".
> can I achieve this in an automated way (e.g. no need to pass the
> information to the "title" function)?
Try replacing