Hi guys i need your folks help: Problem:I have to accept the elements into array and multiply each element of array by 2 and print the resulting array. If input of array is (2,3) i Expect output as (4,6) but output is (0,4,6). why is tht zero cuming.
#!/usr/bin/perl print "Content-type: text/html\n\n"; print "<html><h1>Hello!</h1></html>\n"; @arr=undef; print "dude how many numbers"; $num=<STDIN> ; $i=0; while($i<$num) { print " number enter madho \n"; $inp=<STDIN>; push(@arr,$inp); $i++; } print @arr; $l...@arr; print "len=$len\n"; foreach $num (@arr){ $num *=2; print "$num\n"; #$arr{$i}=($i*5); } print "finally : @arr"; -- K.V. PAWAN KUMAR