#!/usr/bin/perl use strict; use warnings; use LWP::Simple qw(get); use HTML::Parser; my($word) = shift() || die("Usage: $0 <word>\n"); my($html) = get('http://www.dictionary.com/cgi-bin/dict.pl?config=hdml +&term=' . $word) || die("get() '$word' failed: $@"); HTML::Parser->new(text_h => [ sub { foreach (shift()) { print() if (/\ +w/); } }, 'dtext' ])->parse($html); print("\n"); exit();
In reply to Quick dictionary.com definition by staunch
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |