Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Shouldn't arrays be interpolated in print/say statements.
In Perl 5 ..
use strict; use warnings; my @array = ( 1 , 2 , 3 , 4 ); print "The array is @array"; perl ../../programs/array_interpolation.pl The array is 1 2 3 4
In Perl 6 and rakudo ..
use v6; my @array = ( 1 , 2 , 3 , 4 ); say "The array is @array"; ./perl6 ../../programs/array_interpolationp6.pl The array is @array
Bug? Or wrong understanding on my part?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Array interpolation in Rakudo
by moritz (Cardinal) on Aug 10, 2010 at 08:21 UTC | |
|
Re: Array interpolation in Rakudo
by Utilitarian (Vicar) on Aug 10, 2010 at 08:37 UTC | |
by moritz (Cardinal) on Aug 10, 2010 at 09:06 UTC |