Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re^2: @array elements multiplication with another array elements.

by 2teez (Priest)
on Oct 30, 2012 at 18:50 UTC ( #1001537=note: print w/replies, xml ) Need Help??


in reply to Re: @array elements multiplication with another array elements.
in thread @array elements multiplication with another array elements.

Or use a for ( or foreach ) loop like so:

my @answers; for my $x ( 0 .. $#array1 ) { push @answers, $array1[$x] * $array2[$x]; }

If you tell me, I'll forget.
If you show me, I'll remember.
if you involve me, I'll understand.
--- Author unknown to me

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1001537]
help
Chatterbox?
[Corion]: Two-way data binding means that if you change something in a text box, the corresponding variable in your Javascript gets updated immediately as well, and if you then change the variable, the corresponding text box also gets updated
[Corion]: That is a horrible approach that was also taken by Access, but if you have hooks that prevent automatic saving to the database, it is incredibly handy

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (9)
As of 2017-03-30 07:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Should Pluto Get Its Planethood Back?



    Results (355 votes). Check out past polls.