467,077 Members | 996 Online
Bytes | Developer Community
Ask Question

Home New Posts Topics Members FAQ

Post your question to a community of 467,077 developers. It's quick & easy.

weird matching problems

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
Jul 19 '05 #1
  • viewed: 1272
Share:

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by jpastora | last post: by
reply views Thread by Vince | last post: by
reply views Thread by Bruno van Dooren | last post: by
1 post views Thread by Learnicus | last post: by
reply views Thread by Tidane | last post: by
5 posts views Thread by MathStuf | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.