|
[Perl? commandline?] sending WAV to default audio output
Hey
I have a perl script working with my superkaramba to check my mail frequently. I was wondering how can I plug in a command to play a WAV file whenever a mail comes.
Code:
#!/usr/bin/perl
use Net::POP3;
my $ServerName = $ARGV[0];
# If your username contains a @ character you
# must replace it with \@
my $UserName = $ARGV[1];
my $Password = $ARGV[2];
my $pop3 = Net::POP3->new($ServerName);
if (!$pop3) {
print "Błąd";
}
my $Num_Messages = $pop3->login($UserName, $Password) + 0;
if ( $Num_Messages == 1 ){
print $Num_Messages ." wiadomości\n";
}
elsif ( $Num_Messages > 1 ){
print $Num_Messages ." wiadomości\n";
}
else{
print "0 wiadomości\n";
}
$pop3->quit();
__________________
Take care.
Linux User #374234
ACER TM 4060: Pentium M 760 2.0GHz, 15.4 WXGA wide, 100GB HDD, 1GB DDR2 DC, 802.11b/g wireless LAN :cool:
|