http://www.perlmonks.org?node_id=827773


in reply to search a particular file


See the following sample code.
it will match the file name starting with dump and followed by some text and ending with.txt
#!/usr/bin/perl use strict; use warnings; my @files = qw(dump123.txt abc dump124.txt 123 xyz 12dumpa.txt); foreach (@files) { if ( $_ =~ m/^dump.*txt$/) { print $_."\n"; } } <br>


--sugumar--