#!/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 = ; chomp($title); $tag->{TITLE} = $title if ($title); print "Artist [" , $tag->{ARTIST} , "]: "; my $artist = ; chomp($artist); $tag->{ARTIST} = $artist if ($artist); print "Album [" , $tag->{ALBUM} , "]: "; my $album = ; chomp($album); $tag->{ALBUM} = $album if ($album); set_mp3tag($file, $tag); }