#!/usr/bin/env perl # Late Night Jazz # http://r-ch.net/scpt/ open(my $fh, '<', 'stations.txt'); my @lines = <$fh>; my $count = @lines; my $num = int(rand($count)); my $url = @lines[$num]; print $url;