in reply to UTFM - Use the Friendly Modules

I don't know which monk you're talking about, but I was around when a monk asked about parsing HTML (I forget which monk), asking the exact same question after about 10 min of conversation, and I said use HTML::LinkExtor

So like you said, I too say use modules ;)

#!/usr/bin/perl -w use strict; use Data::Dumper qw/DumperX/; use HTML::LinkExtor; use vars qw/$file/; die "pass args man" unless @ARGV; my $p = new HTML::LinkExtor(\&foy); for $file (@ARGV) { $p->parse_file($file); } sub foy { my($t,%A) = @_; if($t eq 'img'){ warn DumperX(\%A).$file unless($A{alt}); } }

 
______crazyinsomniac_____________________________
Of all the things I've lost, I miss my mind the most.
perl -e "$q=$_;map({chr unpack qq;H*;,$_}split(q;;,q*H*));print;$q/$q;"