]> git.rmz.io Git - dotfiles.git/blob - bin/fixMPFC
add tardis bin
[dotfiles.git] / bin / fixMPFC
1 #! /usr/bin/perl
2
3 ###################################################################
4 # This script fixes the series numbering for season 2 of Monty #
5 # Python's Flying Circus #
6 ###################################################################
7
8 use warnings;
9 use strict;
10
11 while (<*>) {
12 my $old_file = $_;
13 /(\d{2})/;
14 my $n = scalar $1;
15 $n -= 14;
16 $n = length($n) == 1 ? "0$n" : $n;
17 s/\d{2}/2x$n/;
18
19
20 print "$old_file -> $_\n";
21 rename($old_file,$_);
22 }