#!/usr/bin/perl
# Author: Alex Efros <powerman-asdf@yandex.ru>, 2002,2004
# License: Public Domain
#
# beep_bolero: Play "Bolero" on the speaker. :)

our $VERSION = 2.00;

my ($tty) = map {chomp;$_} `find /dev/ -name 'tty[0-9]*' -type c -writable`;
die "You need to have write access to console (/dev/tty*)!\n" unless $tty;
open BEEP, ">", $tty or die $!;
select BEEP;
$| = 1;
select(undef,undef,undef,$_), print "\a" for (0, 
    0.45, 0.15, 0.15, 0.15,
    0.45, 0.15, 0.15, 0.15,
    0.45, 0.45, 
    0.45, 0.15, 0.15, 0.15,
    0.45, 0.15, 0.15, 0.15,
    0.15, 0.15, 0.15, 0.15, 0.15, 0.15);

