#!/usr/bin/perl @ser = qw( http://epguides.com/house/ http://epguides.com/trueblood/ http://epguides.com/southpark/ http://epguides.com/MadMen/ http://epguides.com/familyguy/ http://epguides.com/pushingdaisies/ http://epguides.com/Dexter/ ); foreach (@ser) { /epguides\.com\/(.*)\//; print ++$a, ". ", $1, "\n"; } print "Choose series: "; my $ch = ; chomp $ch; die "wrong" unless $ch =~ /^\d\d?$/; @a = `curl $ser[--$ch]`; foreach (@a) { $go++ if /
/; last if /
//g; s/<\/a>//g; push @b, $_ if $go; } shift @b && pop @b for (0..3); print @b;