in reply to case insensitive file operations
#! /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;
|
|---|