This is the output from the find2perl script. It will
search for files with that end with .bat and print out a
list of filenames.
The key to this code is the
/^.*\.bat$/ which
is basically looking for any string
[ ^.* ]
that matches .bat
[ \.bat ] at the end of the
line
[ $ ] The backslash in front of the
period tells perl to match a period instead of any single
character.
#!/usr/bin/perl
require "find.pl";
# Traverse desired filesystems
&find('.');
exit;
sub wanted {
/^.*\.bat$/ &&
print("$name\n");
}