WWW::Dictionary

Númerosos módulos han sido construidos a partir de WWW::Mechanize. Por ejemplo WWW::Dictionary:

pp2@nereida:~/src/perl/testing$ cat log.pl
#!/usr/bin/perl
use warnings;
use strict;
use WWW::Dictionary;

my $dictionary = WWW::Dictionary->new( join('', @ARGV) );
print $dictionary->get_meaning;

Este sencillo código permite acceder a http://dictionary.reference.com/:

pp2@nereida:~/src/perl/testing$ log.pl ensayo | grep -i french
French: rédaction, essai
French: répétition
French: répétition
French: test, épreuve, essai
French: essai, épreuve
French: essai
French: essai
pp2@nereida:~/src/perl/testing$ log.pl rehearsal | grep -i spanish
Spanish: ensayo
Spanish: ensayo

Casiano Rodríguez León
2012-02-29