What you have is correct syntax, but it only initializes $a. Try: my ($a,$b,$c) = (0) x 3; or my ($a,$b,$c) = (0, 0, 0); Please avoid $a and $b as variable names, that will interfere with sort.
After Compline,
Zaxo
In reply to Re: Shorten initializers
by Zaxo
in thread Shorten initializers
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |