Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re^2: case insensitive filename matching

by edan (Curate)
on Feb 10, 2005 at 13:37 UTC ( #429708=note: print w/ replies, xml ) Need Help??


in reply to Re: case insensitive filename matching
in thread case insensitive filename matching

$newfile =~ /^$oldfile$/i

As much as I like regexps, I would be much more likely to write that as:

if ( lc $newfile eq lc $oldfile )

In my eyes, that's the canonical case-insensitive equality comparision.

--
edan


Comment on Re^2: case insensitive filename matching
Select or Download Code
Re^3: case insensitive filename matching
by cog (Parson) on Feb 10, 2005 at 13:45 UTC
    Yes, you're right :-)

    (what was I thinking? :-) )

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://429708]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (15)
As of 2014-09-30 16:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (378 votes), past polls