IDependOn-Set: 1 IDependOn-Set: 3 IDependOn-Set: 66 IDependOn-Set: 84 IDependOn-Set: 85 IDependOn-Set: 96 LastModifiedSecs: 963382380 Parent: 66 SequenceNumber: 4 Title: printimages.pl Part: 0 Author-Set: sauer@cloudmaster.com LastModifiedSecs: 963382380 Type: monospaced Lines: 19 #!/usr/bin/perl -w # # print a list of images in an HTML document # I don't remember if this is an example from some page, or if I wrote # it - so I'm not gonna claim it. It's kinda handy, though. I think I # must've based it on one of the HTML::TokeParser examples. I wonder if # it still works... Maybe "lynx -source filename | printimages /dev/stdin"? # use HTML::TokeParser; my $page = shift || die "Usage: $0 filename.html"; $p = HTML::TokeParser->new($page); while (my $link = $p->get_tag("img")){ my $url = $link->[1]{src} || 'none'; my $text = $link->[1]{alt} || 'none'; print "$url\t$text\n"; } exit(0) EndPart: 0