in reply to
Push + variable argument
I'm not quite certain what you're asking, but I think you want to replace (in your Case 2)
push @arr, ('val', '$str');
with
push @arr, ('val', $str);
Comment on
Re: Push + variable argument
Select
or
Download
Code
In Section
Seekers of Perl Wisdom