in reply to what is the best way to seperate the digits and strings from variable ?

er... what'a all this for? a tupper-party?

just assume we'll going to try to extract every digits from any kind of source:
open SOURCE, "somefile" || die $!; my @source = <SOURCE>; close SOURCE; my $digits = ''; map { my $in = $_; $in =~ s/\D//g; $digits .= $in; } @source;
i mean, apart from that the task itself is rather questionable, i found it questionably funny thinking about it for some time. :D

never mind, im kidding.

language is a virus from outer space.
  • Comment on Re: what is the best way to seperate the digits and strings from variable ?
  • Download Code