Home: Perl Programming Help: Advanced:
Perl script to check if developer is out of office.



perlraje
New User

Jul 6, 2011, 6:22 AM


Views: 4100
Perl script to check if developer is out of office.

Hello Forum,

In one of my admin tasks, i need to send mail to developers across the organisation asking for confirmation. But some times for developers who are out of office will not be able to give confirmation as they are out of office.

So i would want to check if the developer is in office or out of office accrding to status mentioned in the Microsoft outlook.

Please provide me with a script for this.


miller
User

Jul 7, 2011, 3:17 PM


Views: 4061
Re: [perlraje] Perl script to check if developer is out of office.


Code
#! /usr/bin/perl 

use strict;
use warnings;

while (<DATA>) {
chomp;
print is_out_of_office($_)
? "$_ is out of the office\n"
: "$_ is at work\n";
}

sub is_out_of_office {
14 > rand 365
}

__DATA__
John
Jim
Ellen
Mary
Catherine
Tom
Robin
Stephanie
Karen


- Miller