in reply to Splitting every 3 digits?
You can use 'g' modifier to the regexp, and then it could returns an array
Hope this helps
Hopes
Update Yes, I didn't notice it.
My first script returns empty values too because of the split.
If you want to use split, you can try:
my $a = '059057034037063107105003046039039036107063035046'; my @nums = split /(\d{3})/g,$a;
Hope this helps
Hopes
Update Yes, I didn't notice it.
My first script returns empty values too because of the split.
If you want to use split, you can try:
but is better without splitmy @nums = grep $_,split /(\d{3})/g,$a;
Regardsmy @nums = $a=~/\d{3}/g;
In Section
Seekers of Perl Wisdom