in reply to declaring same variable
I don't know if it's considered the right way to do, but it'll take away the errors ;)
my @xxx = (); @xxx = ("one", "two", "three") if ( $op eq "numbers" ); @xxx = ("four", "five") if ( $op eq "alpha" ); @xxx = ("six", "ten") if ( $op eq "alp" );
|
|---|