an enigmatic script intended to reactivate computer

My earlier thread on this (under “64-bit”) has gone cold, and perhaps it was misplaced – but please refer there for history. With others’ help I think I am on the right trail – a perl script that becomes active when the machine goes inactive (!) and executes an rtcwake command designed to spur the computer into action at a designated time so that cron tasks are performed. The script, which is given below and which originated at a Ubuntu forum, is not working, and so I am trying to understand it. Not being familiar with perl, I’m stuck at the line containing the test if(m/^\s+boolean true/){ … what does this mean? Thanks, jdw

#!/usr/bin/perl
my $cmd = "dbus-monitor --session \"type='signal',interface='org.gnome.ScreenSaver', member='SessionIdleChanged'\"";
while (<IN>) {
if (m/^\s+boolean true/) {
system("/usr/sbin/rtcwake -m mem -t $(date --date=01:00:00 +%s)");
system("/usr/sbin/rtcwake -m mem -t $(date --date=05:00:00 +%s)");
system("/usr/sbin/rtcwake -m mem -t $(date --date=10:00:00 +%s)");
system("/usr/sbin/rtcwake -m mem -t $(date --date=15:00:00 +%s)");
} elsif (m/^\s+boolean false/) {
system("echo Issued a wake-up reminder to ensure scheduled crontab jobs run");
}
}

On 2011-03-30 00:36, j1d1w1 wrote:
> Not
> being familiar with perl, I’m stuck at the line containing the test
> if(m/^\s+boolean true/){ … what does this mean? Thanks, jdw

There is a forum here dedicated to programming, you should ask there.


Cheers / Saludos,

Carlos E. R.
(from 11.2 x86_64 “Emerald” at Telcontar)

Thanks Carlos. I’m not sure where specifically you mean. I do see several sub-forums in the forum named “Get Technical Help Here” that mention “software” but its not clear to me which is most suitable. Cheers, jdw

On 2011-03-30 20:06, j1d1w1 wrote:
>
> Thanks Carlos. I’m not sure where specifically you mean. I do see
> several sub-forums in the forum named “Get Technical Help Here” that
> mention “software” but its not clear to me which is most suitable.

http://forums.opensuse.org/forums/english/other-forums/development/programming-scripting/


Cheers / Saludos,

Carlos E. R.
(from 11.2 x86_64 “Emerald” at Telcontar)