#!/usr/bin/perl -w

$VERSION = "0.5";
$PROGVER = $VERSION;

use strict;
use MP3::Tag;

my ($mp3, $count, $v1, $v2)=(undef,0,0,0);

die "usage: id3strip <file ...>" if $#ARGV == -1;

my $t = time;

for my $filename (@ARGV) {
  next until -f $filename;

  $mp3 = MP3::Tag->new($filename);
  $mp3->getTags;
  $count++;
  if (exists $mp3->{ID3v1}) {
    $mp3->{ID3v1}->removeTag;
    $v1++;
  }
  if (exists $mp3->{ID3v2}) {
    $mp3->{ID3v2}->remove_tag;
    $v2++;  
  }
}

warn "$count Files\n$v1 ID3v1 Tags\n$v2 ID3v2 Tags\n". (time-$t) . "seconds \n"; 
