![]() |
|
|
|
#1 |
|
I'm trying to scratch up a whois-like client in perl, and am having a
strange problem with matching input characters. Specifically, matching against things like "@" works fine over the network, but when the application is called locally, the matching does not work. Here's a snippet: # # if resource-type was not specified, detect from resource name # if ($resType eq "" ) { if ($queryInput =~ /@/) { $resType = "contact"; print ( "[Warning: Resource type not specified, ", "detected as $resType.]\n"); } The "@" matches perfectly when calling the application over the network, but it falls into the else{} trap at the end when calling locally. I've tried various escapes and such, but no luck. This happens on two different linux flavors and solaris 9, so I'm assuming there's something I'm missing. Does this have anything to do with locale (set to "C" usually) or charset (usually not set, but sometimes ISO-8859-1)? I didn't have this problem earlier with the script. Thanks Eric A. Hall |
|
|