#!/usr/bin/perl -w use strict; my $dir="."; opendir THUMBS, $dir || die "no such dir"; while (my $Temp = readdir(THUMBS)){ if ($Temp =~ ##Not sure what is needed here { if (rename $TEMP, $1) { print $1; } } } closedir THUMBS;