thmsdrew has asked for the wisdom of the Perl Monks concerning the following question:
MP3::Tag's autoinfo() works as follows:
($title, $track, $artist, $album, $comment, $year, $genre) = $mp3->aut +oinfo(); # or $info = $mp3->autoinfo();
Is there a way to only return specific values from this method? I only want $album and $artist. As I see it, I have to use
($title, $track, $artist, $album) = $mp3->autoinfo();,which defines $title and $track unnecessarily. Can I accomplish this? I have a feeling it might have something to do with using a hash reference. Not too sure though.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Get certain information from MP3::Tag's autoinfo()
by Kenosis (Priest) on Aug 07, 2012 at 20:37 UTC | |
by thmsdrew (Scribe) on Aug 08, 2012 at 12:42 UTC | |
by Kenosis (Priest) on Aug 08, 2012 at 13:30 UTC | |
by thmsdrew (Scribe) on Aug 08, 2012 at 15:23 UTC | |
by Kenosis (Priest) on Aug 08, 2012 at 15:33 UTC | |
|
Re: Get certain information from MP3::Tag's autoinfo()
by toolic (Bishop) on Aug 07, 2012 at 19:19 UTC | |
by thmsdrew (Scribe) on Aug 07, 2012 at 19:29 UTC | |
by hbm (Hermit) on Aug 07, 2012 at 19:39 UTC |