in reply to why is this code bad under -w option?

The -w option generates warnings. They are not critical errors, but more a hint that some things might not be what you think they are. If you feel confident in your code, you can choose to ignore them, and your program will continue running as it did before, but in most cases, you get the warnings because of some deeper errors within your programming.

In the program, perl warns you because you are trying to compare a scalar with no value to a scalar with a string value, and this happens in lines 32, 36 and 40. This is most likely, because one of the two sides of a comparision contains a scalar that was never initialized properly.

In your case, you are trying to capture a match and then using the captured string, without checking whether the match actually succeeded :

$block_size =~ m{([a-zA-Z]{2}$)}; $block_type = $1;
A better way whenever you are matching things is :
$block_size =~ m{([a-zA-Z]{2}$)} or die "I could not find the block type in the string '$block_si +ze'"; $block_type = $1;
</code> because here, you can always be sure that $block_size was what you expected it to be and $block_type contains a meaningfull value.

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