Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/perl
- use warnings;
- use strict;
- use File::Find;
- use File::Basename;
- my $dir = $ARGV[0];
- my $filename="";
- find(\&check_file, $dir);
- sub check_file
- {
- if ( -f $_ ) {
- $filename = basename("$File::Find::name");
- (my $without_extension = $filename) =~ s/\.[^.]+$//;
- my $lastletter = chop $without_extension;
- if ($lastletter eq "a"){
- print ("$_\n");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement