用perl来写一个闹钟程序

use Time::Piece;
use Time::Seconds;
 
my $interval = 60; # Reminder interval in seconds
my $message = "Time for a break!";
 
while (1) {
  my $current_time = localtime;
  print "$current_time: $message\n" if $current_time->second % $interval == 0;
  sleep 1;
}