I was reading perl magazine and saw
sub readable {
my $number = shift;
$matched = $number =~ s{
(\d+)
(\d{3})
(,|$)
}{$1,$2$3}x;
} while ($matched);
return $number;
}
on test driven development article by Denis Kosykh.
I am not sure what
(,|$) is doing...
Can someone please explain?
thank you.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/
