Re: About the hash case insensitive ~~~

2009-10-27 Thread Shlomi Fish
On Tuesday 27 Oct 2009 13:50:16 Majian wrote: > Hello,all: > I had a question about the perl hash case insensitive . > > And I had this script : > == > #!/usr/bin/perl > use warnings; Just a note - you're missing the "use st

Re: About the hash case insensitive ~~~

2009-10-27 Thread Majian
Thanks all ~ when I type this command "perldoc -f uc", then find this : uc EXPR uc Returns an uppercased version of EXPR. This is the internal function implementing the "\U" escape in double-quoted strings. Respects current LC_CTYPE locale if "use locale" in force. See perllocale an

AW: About the hash case insensitive ~~~

2009-10-27 Thread Thomas Bätzler
Majian asked: > %courses = ( > "2CPR2B"=> "C Language", > "1UNX1B"=> "Intro to Unix", > "3SH414"=> "Shell Programming", > "4PL400"=> "Perl Programming", > ); > > print "\n\"EDP\" NUMBERS AND ELECTIVES:\n"; > while (($n

RE: About the hash case insensitive ~~~

2009-10-27 Thread Hack, Gabi (ext)
use uc() to convert to upper case (see below): chomp ($num = uc()); -Original Message- From: Majian [mailto:jian...@gmail.com] Sent: Tuesday, October 27, 2009 12:50 PM To: Perl Beginners Subject: About the hash case insensitive ~~~ Hello,all: I had a question about the perl hash case

Re: About the hash case insensitive ~~~

2009-10-27 Thread Dermot
2009/10/27 Majian : > Hello,all: > I had a question about the perl hash case insensitive . > > And I had  this script : > == > #!/usr/bin/perl > use warnings; > %courses = ( >             "2CPR2B"    => "C Lang

About the hash case insensitive ~~~

2009-10-27 Thread Majian
Hello,all: I had a question about the perl hash case insensitive . And I had this script : == #!/usr/bin/perl use warnings; %courses = ( "2CPR2B"=> "C Language", "1UNX1B"=> &

Fwd: hello Sir, I have an issue with the case insensitive characters, would you plz help me

2006-08-23 Thread Adriano Ferreira
Mukthar, I am not sure I understood your problem, but let me give a try. The user input a value for $MACHINE_TYPE and you want to test if there exists a file "$first.trc.$MACHINE_TYPE" regardless of case in the variable. This is it? It depends: if the filesystem is case-insensitiv

Fwd: hello Sir, I have an issue with the case insensitive characters, would you plz help me

2006-08-23 Thread mukthar ahmed
-- 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, workin

Re: problems with case insensitive tr/// regexp

2003-11-28 Thread Daniel Staal
--As off Friday, November 28, 2003 1:08 PM -0800, R. Joseph Newton is alleged to have said: s[\][]gsi Cool! Thanks, Daniel, that is very nice work. I could feel myself going back over those first steps in using regexes as I followed your post. --As for the rest, it is mine. Heh, thanks. I'm

Re: problems with case insensitive tr/// regexp

2003-11-28 Thread R. Joseph Newton
Daniel Staal wrote: ... > You definitely need the s/// operator, (unless you can use one of the > HTML parsing modules). But let's fix that regrexp first, shall we? > > First off, you may have noticed I removed the first '.*' from your > regrexp: that's because nothing is allowed between the open

Re: problems with case insensitive tr/// regexp

2003-11-27 Thread John W. Krahn
#x27;, '*', 'f', 'o', 'n', 't' and '>' from the $foo variable. > | print $foo, "\n"; > `------- > > But, in order to remove tags from documents where the writers > liked to use uppercase (or camel case) I want to make the

Re: problems with case insensitive tr/// regexp

2003-11-27 Thread Daniel Staal
--As off Thursday, November 27, 2003 7:05 PM -0600, Perl Newbies is alleged to have said: --As off Thursday, November 27, 2003 7:42 PM -0500, Dan Anderson is alleged to have said: So what am I doing wrong and how do I make a case insensitive tr/// regexp? Thanks for your help, --As for

Re: problems with case insensitive tr/// regexp

2003-11-27 Thread Daniel Staal
--As off Thursday, November 27, 2003 7:42 PM -0500, Dan Anderson is alleged to have said: So what am I doing wrong and how do I make a case insensitive tr/// regexp? Thanks for your help, --As for the rest, it is mine. You can't make a case insensitive tr/// regexp: tr/// doesn

problems with case insensitive tr/// regexp

2003-11-27 Thread Dan Anderson
/d; | print $foo, "\n"; `--- But, in order to remove tags from documents where the writers liked to use uppercase (or camel case) I want to make the search case insensitive. So I added an i like when I m/\<.*font.*\>/i font tags. So I had: ,[ erronous code | use strict; | use wa

RE: Case Insensitive

2002-12-03 Thread david
Jenda Krynicky wrote: > Better, but still incorrect. Glad that you point this out! :-) I always make that kind of mistake! david -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: Case Insensitive

2002-12-03 Thread Jenda Krynicky
From: david <[EMAIL PROTECTED]> > Dylan Boudreau wrote: > > > I could be wrong here as I am still pretty new to perl but couldn't > > you just do it like this > > > > if ($x =~ /$y/i) > > > > Dylan > > > > almost correct! :-) how about: > > if($x =~ /^$y$/i) > > your reg. only checks to see

RE: Case Insensitive

2002-12-03 Thread david
Dylan Boudreau wrote: > I could be wrong here as I am still pretty new to perl but couldn't you > just do it like this > > if ($x =~ /$y/i) > > Dylan > almost correct! :-) how about: if($x =~ /^$y$/i) your reg. only checks to see if $y is within $x, not equal. david -- To unsubscribe, e-m

Re: Case Insensitive

2002-12-03 Thread wiggins
this > > > > if ($x =~ /$y/i) > > > > Dylan > > > > -Original Message- > > From: SATAR VAFAPOOR [mailto:[EMAIL PROTECTED]] > > Sent: December 3, 2002 9:27 AM > > To: [EMAIL PROTECTED] > > Subject: Case Insensitive > > >

RE: Case Insensitive

2002-12-03 Thread Beau E. Cox
Ain't perl great? There are always at least 58 ways to do anything/everthing! :) Aloha => Beau. -Original Message- From: Rob Dixon [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 03, 2002 3:41 AM To: Dylan Boudreau; [EMAIL PROTECTED] Subject: Re: Case Insensitive That wo

RE: Case Insensitive

2002-12-03 Thread Beau E. Cox
Or, you could: if (lc $x eq lc $y) { ... } lc changes to lower case. Aloha => Beau. -Original Message- From: SATAR VAFAPOOR [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 03, 2002 3:27 AM To: [EMAIL PROTECTED] Subject: Case Insensitive Hello all, I want to make comaprisons

Re: Case Insensitive

2002-12-03 Thread Rob Dixon
ecember 03, 2002 1:30 PM Subject: RE: Case Insensitive > I could be wrong here as I am still pretty new to perl but couldn't you > just do it like this > > if ($x =~ /$y/i) > > Dylan > > -Original Message- > From: SATAR VAFAPOOR [mailto:[EMAIL PROTECTED]] > Sent:

Re: Case Insensitive

2002-12-03 Thread Nigel Wetters
On Tue, 2002-12-03 at 13:26, SATAR VAFAPOOR wrote: > I want to make comaprisons in an if statement without caring > about upper or lower case eg $x='T'; $y='t' if($x eq $y). can > the i that is used in regex be used here or is there another way. Simplest way is to convert both to lower case, u

RE: Case Insensitive

2002-12-03 Thread Dylan Boudreau
I could be wrong here as I am still pretty new to perl but couldn't you just do it like this if ($x =~ /$y/i) Dylan -Original Message- From: SATAR VAFAPOOR [mailto:[EMAIL PROTECTED]] Sent: December 3, 2002 9:27 AM To: [EMAIL PROTECTED] Subject: Case Insensitive

Case Insensitive

2002-12-03 Thread SATAR VAFAPOOR
Hello all, I want to make comaprisons in an if statement without caring about upper or lower case eg $x='T'; $y='t' if($x eq $y). can the i that is used in regex be used here or is there another way. Thanks Sattar - Do you Yahoo!? Yahoo! Mail Plus - Powerful