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
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
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
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
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
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"=> &
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
-- 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
--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
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
#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
--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
--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
/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
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]
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
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
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
> >
>
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
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
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:
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
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
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
24 matches
Mail list logo