uc.pl



NAME

uc.pl


DESCRIPTION

Upper filenames case in working directory.


COPYRIGHT

Copyright 2010 Etienne LEMEE <coding AT etilem DOT net>

This piece of code is free software; you can redistribute it and/or modify it under the same terms as Perl itself.


#!/usr/bin/perl -w

use strict;

opendir my $DIR, "." or die $!;
for (readdir $DIR) { 
    rename ($_, uc $_) unless ($_ eq uc $_);
}
closedir $DIR;