$a=1; $b=2; sub x { my (0?$a:$b) = shift; print"a=$a\nb=$b\n"; $a=shift } x(3,30); x(4,40); __END__ # OUTPUT: a= b=3 a=30 b=4