DZone Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

Snippets has posted 5883 posts at DZone. View Full User Profile

Using Perl's Math-class

  • submit to reddit
        A little demo that shows how to perform some vector-algebra using Math::-methods.


#use strict;
use Math::VectorReal qw( :all );
use Math::Trig qw( acos );


$scalprod= $a . $b;

print $a."".$b."\n";
print "Angle = ".$dangle."\n";