Just another Perl shrine | |
PerlMonks |
Re: Converting to number doesn't always work...by AnomalousMonk (Archbishop) |
on Nov 22, 2019 at 05:24 UTC ( [id://11109043]=note: print w/replies, xml ) | Need Help?? |
$N =~ tr|[0-9]||cd; NB: The first field of the tr/// operator (see Quote-Like Operators in perlop) is a search list, and it does not "know" about [...] character classes (the search list is itself a kind of character class), so the [ ] characters are among the "digit" characters which are not deleted. Don't know about the rest of the question. Give a man a fish: <%-{-{-{-<
In Section
Seekers of Perl Wisdom
|
|