Perform regular expression on a PERL PDL variable
Posted
by
Ahdee
on Stack Overflow
See other posts from Stack Overflow
or by Ahdee
Published on 2014-06-10T03:20:25Z
Indexed on
2014/06/10
3:24 UTC
Read the original article
Hit count: 118
is it possible to perform a regular expression on a n-dimension PDL variable? For example I can add 100 to all the element by doing
$a1 = pdl [1,2];
print $a1+100;
However what if my array was a bunch of string that I would like to perform some task on, for example this fails.
$a = pdl ['suze','david'];
$a =~ s/suze/female/;
print $a;
- not sure if this is even possible but thanks in advance. Ahdee
© Stack Overflow or respective owner