Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer

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.


Comment on Re^2: case insensitive filename matching
Select or Download Code
Replies are listed 'Best First'.
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?

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

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (7)
As of 2016-02-11 10:11 GMT
Find Nodes?
    Voting Booth?

    How many photographs, souvenirs, artworks, trophies or other decorative objects are displayed in your home?

    Results (366 votes), past polls