#!bin/perl use strict; use warnings; use File::Spec; my $directory = '/home/porter/Videos/blue/'; opendir(DIR,$directory); my @oldfiles = File::Spec->no_upwards( readdir DIR ); closedir(DIR); my @newfiles = qw(Alfa Bèta Gamma Delta Epsilon Zèta Èta Thèta Iota Kappa Lambda Mu Nu Ksi Omikron); my $a = @oldfiles; my $b = @newfiles; if ( $a ne $b ) { print "the numbers are not equal\n" and die; } for (my $i = 0; $i < $a; $i++) { rename $oldfiles[$i],$newfiles[$i]; }