go ahead... be a heretic | |
PerlMonks |
Re: Array Plus Operatorby shmem (Chancellor) |
on Dec 15, 2017 at 14:58 UTC ( [id://1205587]=note: print w/replies, xml ) | Need Help?? |
There's no difference between these two lines
since there is no ambiguity. [] returns a scalar - a reference to an anonymous, empty array - in either case. But the original author perhaps thought it was needed. AFAIK this doesn't behave different in any perl5.
perl -le'print map{pack c,($-++?1:13)+ord}split//,ESEL'
In Section
Seekers of Perl Wisdom
|
|