in reply to case insensitive file operations

Well, this is a hack, but...

#! /usr/bin/perl ### make some files my @dirs = qw(pAuLs PaULs pauls); mkdir($_,0755) for @dirs; my $name="PauLS"; ### all the work $name=~s/(\w)/[\l$1\u$1]/g; my @list = map{ chomp; $_ } `ls -d $name`; ### show what we got print "[".join("][",@list)."]\n"; ### remove the dirs rmdir($_) for @dirs;


Well, you had to fork, and you get a list back rather than a single file, but, it is case insensitive. I think your better off doing the opendir and living with it (as that is what the ls probably did anyway).

my @a=qw(random brilliant braindead); print $a[rand(@a)];