Go Back   Velocity Reviews > Newsgroups > PERL
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply

PERL - weird matching problems

 
Thread Tools Search this Thread
Old 07-24-2003, 07:46 AM   #1
Default 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


Eric A. Hall
  Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump