use LWP::Simple qw/head/; for('http://perlmonks.org/index.pl?displaytype=xml;node_id=484407', 'http://perlmonks.org/index.pl?node_id=484407') { my ($type, $length, $modified_time, $expires, $server) = head($_); print "File is: $type\n"; }