As an update, string concatenation can be used in other situations to force scalar context so it is valid to mention that possibility. In this particular case, 0+ is perfect. However if the goal is only to count ";", tr is even better.
In reply to Re^3: u+ fails to force scalar context to empty list assignment: +( () = ... )
by Marshall
in thread u+ fails to force scalar context to empty list assignment: +( () = ... )
by rsFalse
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |