---------- Forwarded message ----------
From: mukthar ahmed <[EMAIL PROTECTED]>
Date: Aug 23, 2006 5:34 PM
Subject: hello Sir, I have an issue with the case insensitive
characters, would you plz help me
To: perl5-porters@perl.org


Let me introduce myself first,
I am Mukthar Ahmed, working in a software company. I work on perl.
I am facing an problem in writting an case insensitive if condition,
and it is some thing like this, can you please help me......

#   perl script ....
$first = "mod";
print "enter the MACHINE_TYPE value \n"; # the machine type entered
may be #winnt which might be expected in any case - lower case or
upper case,
$MACHINE_TYPE = <STDIN>;
chomp($MACHINE_TYPE);

#       $file = "$first.trc.$MACHINE_TYPE";

#       $machine = "/$MACHINE_TYPE/i";
if (-e "$first.trc.$MACHINE_TYPE") {
      #       print "$first.trc.$MACHINE_TYPE ******************* \n";
      print "FILE FOUND - $first.trc.$MACHINE_TYPE \n";
}
else {
      print "the file notfound \n";
}

***************************************************
I want to know an case insensitive character and its syntax which
would be placed at the variable - $MACHINE_TYPE in the if - condition
which would accept winnt given with any of the combinatioins of the
cases(upper or lower)

Regards,
Mukthar Ahmed.M

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to