Help for this page

Select Code to Download


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