Hi folks,
I'm stumped...I wrote a test script and this pattern matches just fine, but
when I try to use it in another script it does match as it should.
Basically, if the pattern detects an _ underscore in the string it should
return undef; if it doesn't match it returns true. Here's some code:
if(isFacStaff('xty_1233'))
{
print "Is Faculty/Staff!\n";
}
else
{
print "Is Student!\n";
}
sub isFacStaff
{
my $id = @_;
#this will match student-style ID's
#it is rather easier to match against student IDs than staf IDs
if($id =~ m/^.+_.+$/i)
{
return;
}
else
{
return 1;
}
}
Thanks in advance for any help!
DTS
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]