The Perl Toolchain Summit 2025 Needs You: You can help 🙏 Learn more
1234567891011121314 #!perluse strict;use warnings;use Math::Matrix;use Test::More tests => 2;my $x = Math::Matrix -> new([[2.71828, 0.69315], [1.41421, 3.14159]]);my $s = $x -> as_string();is(ref($s), '', '$y is a scalar');is($s, " 2.71828 0.69315 \n 1.41421 3.14159 \n", '$s has the right value');
#!perl
use
strict;
warnings;
Math::Matrix;
Test::More
tests
=> 2;
my
$x
= Math::Matrix -> new([[2.71828, 0.69315],
[1.41421, 3.14159]]);
$s
=
-> as_string();
is(
ref
(
),
''
,
'$y is a scalar'
);
" 2.71828 0.69315 \n 1.41421 3.14159 \n"
'$s has the right value'