Here is the code...
use strict;
use warnings;
my @array= (1,2,3,4,5);
my $scalar= 5;
@array= $scalar*@array;
print @array;
Need something that can perform similar function with little code. Thanks!
Use foreach.
foreach my $x (@array) { $x = $x * $scalar; }