It's not even two weeks into the new year and I'm already a big fat dumbass.
I have a bunch of files named with this pattern:
\d+\.\.txt
Huh? Where did those double dots come from?
my $file = File::Spec->catdir( $folder,
join ".", $index, '.txt'
);
Well, which is it going to be? I can either join() on a dot or have the dot in the extension.
No matter: it was easy to fix (code and problem).
perl -e 'for(@ARGV){($s=$_)=~s/\.\././;rename($_, $s)}' *..txt
Re: (Score:1)
rename (Score:1)
-DA [coder.com]