Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

Error: Can't modify subroutine entry in scalar assignment at script.pl line 165, near "$_;"
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>... 
> 
> 

Report this thread to moderator Post Follow-up to this message
Old Post
seane
08-30-04 08:56 PM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

PERL Beginners archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 04:58 PM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.