in reply to Re^4: seeking improvement in my smiple program using regular expression
in thread seeking improvement in my smiple program using regular expression

Repeated captures do not work. Only the last repetition actually captures anything. Contrast:

my @captures = 'abcde' =~ m[(.){3}]; print "@captures";; c

with

my @captures = 'abcde' =~ m[(.)(.)(.)];; print "@captures";; a b c

and

'abcde' =~ m[(.){3}] and print "$1,$2,$3";; Use of uninitialized value in concatenation (.) or string at ... Use of uninitialized value in concatenation (.) or string at ... c,, 'abcde' =~ m[(.)(.)(.)] and print "$1,$2,$3";; a,b,c
all these regexes are untested.

You might consider revising that policy.


Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
"Too many [] have been sedated by an oppressive environment of political correctness and risk aversion."