http://qs1969.pair.com?node_id=1152637


in reply to Re^2: min $#a, $#b > $#b
in thread min $#a, $#b > $#b

Actually anything that will initiate a new value instead of just forwarding the current one will work (like adding quotes around the variable, 0+$var, or even scalar($var), though I wasn't actually expecting this one), because the new value won't have the same magic. I did think about forcing a copy of some variables (which explains the quotes in some parts of my code), but since I had been working on the issue for a while (I started with much bigger code, I reduced it trying to find the bug), I wasn't sure at the time of my post whether I was doing some kind of silly mistake, and I never thought about forcing the copy on the parameters of min. Thanks for the answer !