use strict; $SIG{INT} = 'IGNORE'; open(INPUT,"index.html") || die "Cant open index.html\n"; while(){ if(/^/){ my $mp3 = $1; $mp3 =~ s/\./\\\./g; if ($mp3 =~ /$ARGV[0]/i){ $mp3 =~ s/\\\./\./g; (my $print_mp3 = $mp3) =~ s/%20/ /g; print "Now Playing $print_mp3\n"; `mpg123 -p none -b 500 -q $mp3`; } } } close INPUT;