Ward Vandewege wrote: [snip]
--- Simple.pm 2003-12-31 14:15:59.000000000 -0500 +++ Simple.pm 2003-12-31 14:16:24.000000000 -0500 @@ -180,7 +180,7 @@ if ($buf =~ m,^HTTP/\d+\.\d+\s+(\d+)[^\012]*\012,) { my $code = $1; #print "CODE=$code\n$buf\n"; - if ($code =~ /^30[1237]/ && $buf =~ /\012Location:\s*(\S+)/) { + if ($code =~ /^30[1237]/ && $buf =~ /\012Location:\s*(\S+)/i) { # redirect my $url = $1; return undef if $loop_check{$url}++;
Perhaps if you used a character class instead? something like /\012[Ll]ocation:\s*(/S+)/
I've heard that the /i flag can greatly increas the cost of the regex on older perls (maybe all perls?).
-- In Reach Technology: http://inreachtech.net/
Robert G. Werner [EMAIL PROTECTED]
Tel: 559.304.5122
Say what you mean, simply and directly. - The Elements of Programming Style (Kernighan & Plaugher)