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"; }
In reply to Re^4: Perl script on windows node
by kaka_2
in thread Perl script on windows node
by kaka_2
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |