Skrypt przeznaczony na desktopa; sprawdza czy nie mamy nowych maili jak jest to miga na zmiane capsem i scroolem
#!/usr/bin/perl
`/usr/bin/setleds -L -scroll < /dev/tty1`;
`/usr/bin/setleds -L -caps < /dev/tty1`;
$IP='10.10.10.11';
$LOGIN=aaaaaa;
$PASS=aaaaaa;
$a=3;
$b=2;
while ($a>$b){
use Net::POP3;
$pop = Net::POP3->new($IP);
$result = $pop->login ( $LOGIN , $PASS );
$pop->quit();
$ilosc=10;
if ($result > 0) {
while ($ilosc > 0){
sleep 1;
`/usr/bin/setleds -L -scroll < /dev/tty1`;
`/usr/bin/setleds -L +caps < /dev/tty1`;
sleep 1;
`/usr/bin/setleds -L -caps < /dev/tty1`;
`/usr/bin/setleds -L +scroll < /dev/tty1`;
$ilosc--;
}
}
else {
`/usr/bin/setleds -L -scroll < /dev/tty1`;
`/usr/bin/setleds -L -caps < /dev/tty1`;
sleep 30;
}
}