in reply to Re^3: Wildcard usage for REMOTE_ADDR comparison
in thread Wildcard usage for REMOTE_ADDR comparison
Your question:
what would a wild card for :is not specific enough. The answer depends on what you want to match against.
if ($ENV{REMOTE_ADDR} eq '180.76.6.') {
My previous post shows a somewhat more flexible regular expression that allows but does not require leading zeros in an octet.if ($ENV{REMOTE_ADDR} =~/180\.76\.6\.\d{1,3}/) {
However, as afoken (++) pointed out, this may be too much flexibility if the value you are checking for comes from a "trusted" source, like the CGI module.
"By three methods we may learn wisdom: First, by reflection, which is noblest; Second, by imitation, which is easiest; and third by experience, which is the bitterest." -Confucius
|
|---|