One possibility:
print STDERR 'file: ' . __FILE__ . ', line: ' . __LINE__ . "\n";
In case you are wondering about all the concatenation, you can't use __FILE__ and __LINE__ inside double quotes. __FILE__ and __LINE are "special literals" and they lose their specialness inside double quotes. To learn more about __FILE__ and __LINE, look at perldata and search for the phrase "Special Literals".
Best, beth
In reply to Re: Executing line number
by ELISHEVA
in thread Executing line number
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |