Hey,
I am trying to write personal error_log for a perl program I wrote. What I want in the error_log is the line number where the error occured, the file name and the error message. I know how to get the file name ($0), and I will send my own text message, but is there anyway to get what line you are actually at in a perl program? Just to give you an idea of what I mean:
Thanks
Later
I am trying to write personal error_log for a perl program I wrote. What I want in the error_log is the line number where the error occured, the file name and the error message. I know how to get the file name ($0), and I will send my own text message, but is there anyway to get what line you are actually at in a perl program? Just to give you an idea of what I mean:
Code:
if($username !="something")
{
my $line = ????;
my $msg ="Your username does not equal something!!";
logError($0,$line,$msg);
}
Thanks
Later