[Date Prev][Date Next][Thread Prev][Thread Next][Interchange by date
][Interchange by thread
]
[ic] perl syntax of shopping cart items
"Kevin Walsh" <kevin@cursor.biz> writes:
[...]
>
> So, stripping down the above example, you can push all the SKU
> values into one array using the following two lines of Perl code:
>
> my @out;
> push(@out,$_->{code}) for (@{$Carts->{main}});
A little bit more appropriate is:
@out = map {$_->{code}) @{$Carts->{main}};
Ciao
Racke
--
Think of it !
For projects and other business stuff please refer to COBOLT NetServices
(URL: http://www.cobolt.net; Email: info@cobolt.net; Phone: 0041-1-3884400)