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
The ISS (or other satellites)
Results (266 votes). Check out past polls.