in reply to Re^3: Perl script on windows node
in thread Perl script on windows node
Guys. i need further help. As a action i need to run a command. so what i did is added below in the BOLD.
But it return me error saying <c> Bareword found where operator expected at C:\Migration\failover.pl line 17, near "$OPCMSG a" (Missing operator before a?) syntax error at C:\Migration\failover.pl line 17, near "$OPCMSG a" Substitution replacement not terminated at C:\Migration\failover.pl line 17. How can i run this command through script?#use 5.010; use strict; my $modified_within = 60 * 2; # 2 minutes my $size_limit = 1024 * 1024 * 2; # 2 MB my $OPCMSG = "C:\Program Files\HP\HP BTO Software\bin\win64\OpC\opc +msg.exe"; my $file = "H:\\Program Data\\HP\\HP BTO Software\\shared\\tmp\\queues +\\MsgQueue"; if ([stat $file]->[9] > time - $modified_within) { if (-s $file > $size_limit) { # print "File is recent, and over size limit"; } else { print "File is recent, but not over size limit"; $OPCMSG a=OM9 o=failover s=normal mag_t="Hello!! I am fine, hope you a +re doing well"; } } else { print "File is not recent"; }
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^5: Perl script on windows node
by marto (Cardinal) on Apr 03, 2012 at 15:48 UTC | |
by kaka_2 (Sexton) on Apr 03, 2012 at 16:12 UTC | |
by GrandFather (Saint) on Apr 03, 2012 at 20:25 UTC | |
Re^5: Perl script on windows node
by cdarke (Prior) on Apr 03, 2012 at 15:40 UTC |
In Section
Seekers of Perl Wisdom