in reply to Script Review...
I would use an alternate regex delimiter, maybe "#":if(/^(.+)\s(http:\/\/\S+)\s*(.+)$/){
and in this:if ( m#^(.+)\s(http://\S+)\s*(.+)$# ) {
You don't need to backwhack the quotes inside the character classes. In fact, I think the only character you need to backslash inside the '[]' brackets is a backslash.$http->body()=~/<\s*img[^>]*src\s*=\s*[\'\"]([^\'\"]+)[\'\" +][^>]*$ALT/i
the above is more perlish (and dimention is more correctly spelled) as:my ($dimention); for $dimention ('-width','-height'){
You have my ($var)= ... all over when you really mean my $var = .... The difference is whether the expression on right side of the '=' is in list or scalar context. It often doesn't matter, but someday you may be bitten by this.for my $dimension ( qw(-width -height) ) {
Last, there doesn't seem to be any reason not to Use strict and warnings.
|
|---|