in reply to Using Perl to organize my MP3's

Or a little more compactly,
exists $mp3->{$_} and $mp3->{$_}->remove_tag() for qw(ID3v1 ID3v2);
or even
$mp3->{$_}->remove_tag() for grep exists $mp3->{$_}, qw(ID3v1 ID3v2);

Makeshifts last the longest.

Replies are listed 'Best First'.
Re: Re: Using Perl to organize my MP3's
by spurperl (Priest) on Jan 07, 2003 at 05:35 UTC
    Nice, thanks...

    The duplicated code seemed a bit smelly to me, and yours is a nice solution.