mountainbiker
Programmer
I was wondering if anyone has a clean, niffy way of reading in an HTML file's meta data and stuff it into a hash?
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
sub getMetaData {
die "$!\n" if ( ! open(HTML, "$@_[0]") );
my %data = map { /meta name="(.*)" content="(.*)"/is } <HTML>;
# print "$_ => $data{$_}\n" for keys %data;
return \%data;
}