⭐ in reply to How do I create a matrix?
You can use PDL::Matrix
Which then also allows you to perform clean, fast math on them.#!/usr/bin/perl -w use strict; use PDL::Matrix; my $m = pdl [ [1,2,3], [4,5,6], [7,8,9] ];
my $m = pdl [ [1,2,3], [4,5,6], [7,8,9] ]; my $n = pdl [ [1,0,0], [0,1,0], [0,0,1] ]; my $r = $m x $n;
In Section
Seekers of Perl Wisdom