OROSZI Balázs wrote:
> Hi!

Hello,

> Is there a simple way of multiplying all elements of an array/list with
> a value, then store the result in a new array, or do I have to use loops?

my @new_array = map $_ * $value, @array;



John
-- 
Perl isn't a toolbox, but a small machine shop where you can special-order
certain sorts of tools at low cost and in short order.       -- Larry Wall

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to