in reply to Not find a word / remove first char in string / remove last value in list
I think that perldoc perlre as a reference and perldoc perlretut as a tutorial for regular expressions work well. If you want a book that goes far beyond this, have a look at Mastering Regular Expressions, although I don't know how good it is at introducing regular expressions.
Some pointers to get you started on your homework:
Experiment with these to find the solution for the first exercise.if ($item !~ /foo/) {}; if (! $item =~ /foo/) {};
Personally, I wouldn't approach many of these problems with regular expressions, as the time invested to craft such a special RE takes much too long for me, when a step-by-step solution is immediately available.
perl -MHTTP::Daemon -MHTTP::Response -MLWP::Simple -e ' ; # The $d = new HTTP::Daemon and fork and getprint $d->url and exit;#spider ($c = $d->accept())->get_request(); $c->send_response( new #in the HTTP::Response(200,$_,$_,qq(Just another Perl hacker\n))); ' # web
|
|---|