Thank you Joel and Bart for the __LINE__ idea. These tools are just what I needed. I specially like the "caller" method, which I'm going to use as:
sub ln {unshift @_, (caller)[2]; print "@_\n"}; .. . . ln ".. show $somedata"; # for short diags Cheers - - - On Tue, 20 Aug 2002 12:04:18 +0200, Bart Lateur wrote: >Second is to call a sub, which, through caller(), can determine which line >it's been called from. > sub ln { > return join " ", (caller)[1, 2]; > } > print ln, " this is line 8"; >--> > test.pl 8 this is line 8