My understanding of perl6 is that it <H> gobbles as much and no more then the assignement context warrants.
($a, $b) = <STDIN>
eats two lines of std input.
But I suppose that
print <STDIN>
eats all of
STDIN. So you example would be optimized to the perl5 equivalent of
print scalar <STDIN>;
Please correct me if I am wrong.
In reply to Re: Will Perl 6 optimize away useless assignments?
by stefp
in thread Will Perl 6 optimize away useless assignments?
by princepawn
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |