in reply to Re: Listbox, radio buttons and text box in sub function?
in thread Listbox, radio buttons and text box in sub function?

Hey, Thanks for the suggestion. Looks like I am still having issues with this as well. The text entered is being lumped into the array @choice1 i.e. it is the last element of the array and $localpath still has no value. Any suggestions??
  • Comment on Re^2: Listbox, radio buttons and text box in sub function?

Replies are listed 'Best First'.
Re^3: Listbox, radio buttons and text box in sub function?
by choroba (Cardinal) on Feb 10, 2016 at 20:12 UTC
    The problem probably comes from a part of the code you didn't show:
    my (@choice1, $localpath) = myListBox(qw( item1 item2 item3 ));

    This indeed doesn't work, as assignment to an array gobbles up all the values from the right hand side. Swap the arguments, or return an array reference.

    return ($localpath, @choice1) # ... my ($localpath, @choice1) = myListBox(qw( item1 item2 item3 )); # OR return (\@choice1, $localpath) # ... my ($choice_ref, $localpath) = myListBox(qw( item1 item2 item3 ));
    ($q=q:Sq=~/;[c](.)(.)/;chr(-||-|5+lengthSq)`"S|oS2"`map{chr |+ord }map{substrSq`S_+|`|}3E|-|`7**2-3:)=~y+S|`+$1,++print+eval$q,q,a,
      Thanks a ton! Works like a charm