<?xml version="1.0" encoding="windows-1252"?>
<node id="986059" title="Get certain information from MP3::Tag's autoinfo()" created="2012-08-07 15:03:42" updated="2012-08-07 15:03:42">
<type id="115">
perlquestion</type>
<author id="964068">
thmsdrew</author>
<data>
<field name="doctext">
&lt;p&gt;MP3::Tag's &lt;tt&gt;autoinfo()&lt;/tt&gt; works as follows:&lt;/p&gt;&lt;code&gt;($title, $track, $artist, $album, $comment, $year, $genre) = $mp3-&gt;autoinfo();
# or
$info = $mp3-&gt;autoinfo();&lt;/code&gt;&lt;p&gt;Is there a way to only return specific values from this method? I only want &lt;tt&gt;$album&lt;/tt&gt; and &lt;tt&gt;$artist&lt;/tt&gt;. As I see it, I have to use&lt;/p&gt;&lt;code&gt;($title, $track, $artist, $album) = $mp3-&gt;autoinfo();&lt;/code&gt;,&lt;p&gt;which defines &lt;tt&gt;$title&lt;/tt&gt; and &lt;tt&gt;$track&lt;/tt&gt; unnecessarily. Can I accomplish this? I have a feeling it might have something to do with using a hash reference. Not too sure though.&lt;/p&gt;</field>
</data>
</node>
