#!/usr/bin/perl -w
use strict;
use MP3::Info;
my $tag = {};
while ( my $file = shift ) {
my $newtag = get_mp3tag($file);
if ($newtag) {
$tag = $newtag;
}
print $/, $file, $/;
print "Title [" , $tag->{TITLE} , "]: ";
my $title = <STDIN>;
chomp($title);
$tag->{TITLE} = $title if ($title);
print "Artist [" , $tag->{ARTIST} , "]: ";
my $artist = <STDIN>;
chomp($artist);
$tag->{ARTIST} = $artist if ($artist);
print "Album [" , $tag->{ALBUM} , "]: ";
my $album = <STDIN>;
chomp($album);
$tag->{ALBUM} = $album if ($album);
set_mp3tag($file, $tag);
}
syntax highlighted by Code2HTML, v. 0.9.1