Skip to content

Instantly share code, notes, and snippets.

@metaperl
Created September 29, 2010 13:21
Show Gist options
  • Select an option

  • Save metaperl/602733 to your computer and use it in GitHub Desktop.

Select an option

Save metaperl/602733 to your computer and use it in GitHub Desktop.
#!/usr/bin/perl
# appease songbird
use strict;
use warnings;
while (my $filename = <STDIN>) {
chomp $filename;
if ($filename =~ /(.+).mp4/) {
my $new_name = "$1.m4a";
rename $filename, $new_name;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment