in reply to Executing line number
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
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Executing line number
by Burak (Chaplain) on Sep 09, 2009 at 22:36 UTC | |
Re^2: Executing line number
by johngg (Canon) on Sep 09, 2009 at 22:32 UTC | |
by Burak (Chaplain) on Sep 09, 2009 at 22:37 UTC |