weird matching problems

E

Eric A. Hall

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,764
Messages
2,569,567
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top