File: exampleB.pl

package info (click to toggle)
libhtml-microformats-perl 0.105-6
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, sid, trixie
  • size: 1,340 kB
  • sloc: perl: 14,121; makefile: 10; sh: 1
file content (17 lines) | stat: -rwxr-xr-x 403 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
	use HTML::Microformats;
	use LWP::Simple qw[get];
	
	my $page     = 'http://tantek.com/';
	my @xfn_objs = HTML::Microformats
	               ->new_document(get($page), $page)
	               ->assume_all_profiles
	               ->parse_microformats
	               ->objects('XFN');
	
	while (my $xfn = shift @xfn_objs)
	{
		printf("%s <%s>\n",
			$xfn->data->{title},
			$xfn->data->{href},
			);
	}