This observation was provided by a co-worker. He and I were both surprised that this worked as it does:
produces:use strict; use warnings; my $s = 'foo'; print "s=$ s\n";
But I would have expected this to be consistent and it's not:s=foo
produces:use strict; use warnings; my @a = (qw/a b c def/); my $s = "foo"; print "s=$ s, a=@ a\n";
s=foo, a=@ a
Is there a defined rule for the whitespace allowed between a variable's type identifier and its name? Or is this just an anomoly of variable interpolation in quoted strings?
In reply to Surprising whitespace behavior by steves
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |