Code Comments
Programming Forum and web based access to our favorite programming groups.I have this code and receive the message "Can't modify subroutine
entry in scalar assignment at script.pl line 165, near "$_;" " when
running on perl, version 5.005_03 but not when running on perl version
v5.6.1, I know the easiest answer would be to upgrade the older verson
of perl but I have NO control over that.
Is there a change I can make for this to work on 5.005.03 as well.
I appreciate your help:
$conmsg=("Agent is now connected");
$disconmsg=("Agent is now disconnected");
foreach (@logarray)
{
our $msg = $_; #this is line 165.
if ($msg=~ "$conmsg")
{
$flag="TRUE"
}
if ($msg=~ "$disconmsg")
{
$flag="FALSE"
}
}
if ($flag eq "FALSE")
{ system("echo Please check $filein. The following message
was found: $disconmsg. |mail -s \"$0 - $sysName\"
username\@host.com");
print"An error was found, an email has been sent. \n";
exit(1);
}
seane@us.ibm.com (seane) wrote in message news:<6634fdf1.0408020641.5b9f9b4e@posting.google
.com>...
> OK you ever spell check a document and you are so far off that spell
> check has no idea what you are trying to spell????
>
> That's what I feel like here.. Am I that far off base?
> What I have here works it's just not exactly what I want...
>
> At the end of the script running; I basically want to know if the
> agent is still connected or has it disconnected, sometimes it will
> drop connection but then reconnect on it's own and each event will
> write to the log.
>
> Any pointers/suggestions would be appreciated.
>
>
>
>
> seane@us.ibm.com (seane) wrote in message news:<6634fdf1.0407281010.2f825f
8b@posting.google.com>...
>
>
Post Follow-up to this message
Show a Printable Version
Email This Page to Someone!
Receive updates to this thread
Powered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.