Help for this page

Select Code to Download


  1. or download this
    1:foreach (sort(<*>)) {
    2:        $a = $_;
    ...
    6:        $_ = lc($_);
    7:        rename("$a", $_);
    8:}
    
  2. or download this
    foreach my $old( <*> ) {
        (my $new = lc $old) =~ s/ |%20/_/g;
        $new =~ s/%25//g;
        rename( $old, $new ) or warn "can't rename $old to $new: $!\n";
    }