in reply to difference between "*." and "." operators

Hi,
not sure I understand what you want...
This is how I interpret your code (pls. use code tags by the way):
#!/usr/bin/perl use strict; use warnings; my $string = "abcABC123ABCabc"; # the following is using shell commands # to do something perl can do much better... echo `expr match "$string" 'abc[A-Z]*.2'` ; echo `expr match "$string" 'abc[A-Z]*2'` ;
As said - not sure what your intention is.

To test a regex, you'd use something like:
#!/usr/bin/perl use strict; use warnings; my $string = "abcABC123ABCabc"; print "Regex1: ", $string =~ /abc[A-Z]*.2/, "\n" ; print "Regex2: ", $string =~ /abc[A-Z]*2/, "\n";
Result:
Regex1: 1 Regex2:
Reason: The first matches any number of uppercase characters, followed by 1 character then followed by a 2 (this regex matched once in the string, therefore 1). The second matches any number of A-Z followed by a 2 - as there is a 1 inbetween, it doesn't match.
Maybe you look after .* which will match any number of any character???
Regards,
svenXY