#!/usr/bin/perl -w use strict; #(C) 2003 John B. Silvestri #include while(1){ #Infinite loops are *fun* my $msg=; chomp $msg; my $player= sprintf("%s", ($msg=~m/ogg$/ ? "ogg123" : "mpg321")); my @args=($player, "-v", $msg); system(@args) == 0 or die "system @args failed: $?"; print "\n-----------\n"; }