#!/usr/bin/perl use strict; use warnings; my $dir = 'C:\Tickets'; chdir $dir or die "Error - Please check that $dir exists and is accessible.\n"; my @fileList = glob '*Closed*'; foreach (@fileList) { next if -d; my $oldname = $_; s/Closed/Open/; rename $oldname, $_; }