Friday, October 18, 2013

perl: Set fileName and line no in print

Here is small tip for those who want to print current file and line number. It helps when code spread across multiple files.

here is example :-

print "@{[ __FILE__ ]}:@{[ __LINE__ ]}: here goes your custom log \n";

---Enjoy debugging

No comments: