rendered paste body#THE CALL
tabs( side => "right", selected => 1,
tabs => [{ title => "To Do", url => "?tab2=1"},
#THE SUB
sub tabs {
%args = @_;
print "Selected: $args{'selected'}<br>";
print "Side: $args{'side'}<br>";
print "<pre><div>".Dumper($args{'tabs'})."</div></pre><hr>";
@tabs = @{$args{'tabs'}};
print "<pre><div>".Dumper(@tabs)."</div></pre><hr>";
%tab = $tabs[0];
print "<pre><div>".Dumper(%tab)."</div></pre><hr>";
%tab = $tabs[1];
print "<pre><div>".Dumper(%tab)."</div></pre><hr>";
#So I've got the output correct to here I think. In @tabs is two values which are both hashtables..
#Now I just need to figure out how to access them.
#THE OUTPUT
$VAR1 = [ { 'url' => '?tab2=1', 'title' => 'To Do' }, { 'url' => '?tab2=2', 'title' => 'Tried' } ];
$VAR1 = { 'url' => '?tab2=1', 'title' => 'To Do' }; $VAR2 = { 'url' => '?tab2=2', 'title' => 'Tried' };
$VAR1 = 'HASH(0x9a7806c)'; $VAR2 = undef;
$VAR1 = 'HASH(0x9cc087c)'; $VAR2 = undef;