The fact is that it PDLis a perl extension intended for scientific and mass processing and display of numerical data. So this is really not done to manipulate String. When you try to iterate through a script:
use strict;
use warnings;
use PDL;
my $a = pdl ['suze','david'];
print $_ . "\n" foreach ($a->list);
You'll get:
Argument "suze" isn't numeric in subroutine entry at Basic/Core/Core.pm.PL (i.e. PDL::Core.pm) line 1296, <DATA> line 207.
0
0
Argument "david" isn't numeric in subroutine entry at Basic/Core/Core.pm.PL (i.e. PDL::Core.pm) line 1296, <DATA> line 207.
When you delve deeper into POD, you will find:
$a = pdl(SCALAR|ARRAY REFERENCE|ARRAY|STRING);
STRING
pdl bad, inf nan , ( , ). , .
, PDL ? - ?
use strict;
use warnings;
use Data::Dumper;
my $a = ['suze','david'];
s/suze/female/ for @{$a};
print Dumper $a;
:
$VAR1 = [
'female',
'david'
];
user1558455