in reply to array assignment with list operator , no parenthesis
You are not copying an array into your array. You are putting in the result of the operation 7,2,3 which is 7 @one = 7,2,3 which due to precedence is evaluated as (my @one = 7),2,3 as previously explained in this thread. To get the array I think you want in there:
use strict; use warnings; use strict; my @one = (7,2,3); print "@one\n"; Output :- 7 2 3
Cheers,
R.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: array assignment with list operator , no parenthesis
by shmem (Chancellor) on May 14, 2007 at 14:10 UTC |