in reply to Re^2: [Windows] Given lower-cased file name, how to get actual file name (stored on filesystem) ?in thread [Windows] Given lower-cased file name, how to get actual file name (stored on filesystem) ?
$ md tmpblah
$ echo > tmpblah\aone.pl
$ echo > tmpblah\bOne.pl
$ echo > tmpblah\cONe.pl
$ echo > tmpblah\dONE.pl
$ perl -MPath::Class::Rule -le "print for Path::Class::Rule->new->file
Ah, I thought there would be an approach not involving ->all, which is IMO not different from just using grep /one.pl/ readdir $foo. But at least it has a nice syntax. I was hoping for something more direct there.
$ perl -MFile::Spec -le " print File::Spec->rel2abs( shift ) " tmp\tmp
$ perl -MPath::Class -le " print file( shift )->resolve " tmp\tmpblah\
$ perl -MPath::Class -le " print file( shift )->resolve->absolute " tm
An electronic device
Being the designated driver
Spending time with a celebrity
I never won anything
I never play the lottery
I haven't checked my spam folder recently
Results (432 votes). Check out past polls.