silent11 has asked for the wisdom of the Perl Monks concerning the following question:
I know I should be using a module for this, but I wanna do it on my own.use CGI qw/:standard/; use LWP::Simple; print header,start_html('My Dictionary'),start_form,"Enter a word:",te +xtfield('word'),p,submit,end_form,hr; $engine = "http://www.dictionary.com/cgi-bin/dict.pl?term="; $word = param('word'); $url = "$engine$word"; $string = get($url); $start = '<!-- resultItemStart -->'; $end = '<!-- resultItemEnd -->'; $string = m/($start)(*)($end)/; print "$2";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: pattern matching
by demerphq (Chancellor) on Jan 16, 2002 at 22:31 UTC | |
|
Re: pattern matching
by ViceRaid (Chaplain) on Jan 16, 2002 at 22:36 UTC | |
|
Re: pattern matching
by dereks (Scribe) on Jan 16, 2002 at 22:18 UTC | |
by cLive ;-) (Prior) on Jan 16, 2002 at 22:39 UTC | |
by Juerd (Abbot) on Jan 17, 2002 at 00:51 UTC | |
|
Re: pattern matching
by andye (Curate) on Jan 16, 2002 at 22:39 UTC | |
by demerphq (Chancellor) on Jan 16, 2002 at 22:46 UTC | |
by andye (Curate) on Jan 17, 2002 at 15:34 UTC |