in reply to Re^2: Matching condition for two files
in thread Matching condition for two files

CountZero++. I had tried it and got stuck in some muck, but I used your regex and a foreach:
#!/usr/bin/perl use strict; use warnings; use Data::Dumper::Concise; my(@array) = ('M8BBABONPGM100.dat', 'M8BBABONPYM101.dat'); foreach my $array(@array) { if ($array =~ /^M8BBABONP\wM10\d\.dat$/){ print "We have a match: \n"; print Dumper($array); } }