in reply to Re^2: Counting Array in an Array of HoA
in thread Counting Array in an Array of HoA

No, I believe the "=~" is used in regex there, from my minimal understanding $test is the string that contains the regex. I am still trying to understand the how on the rest of the script, though.

Update: After some testing, I used a much simpler version to get to this.
#!/usr/bin/perl -w use strict; my $string='ABCD'; my $string1='DCBA'; my $test='.*?AB'; print "Matched in $string" if $string =~ $test; # Prints Match. print "Matched in $string1" if $string1 =~ $test; # Does not print + Match.

So $test does contain the regex '.*?AB' or '.*?BA'. If I am not correct here, please let me know.

Update: Adjusted code to differentiate the output.