- or download this
my @data = ( [1 .. 3], [4 .. 6], [7 .. 9] );
...
$data[$i][3] = $norm;
}
}
- or download this
#!/usr/bin/perl
use warnings;
...
$data[$i][3] = $norm;
}
}
- or download this
sub norm{
for(@data){ # iterates down @data
...
$$_[3] = $norm;
}
}
- or download this
#!/usr/bin/perl
use warnings;
...
$$_[3] = $norm;
}
}
- or download this
sub norm{
my $ar = shift;
...
$$_[3]=(($$_[0])**2+($$_[1])**2)**(1/2); #calculates the norm
}
}