Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Basically my goal is for any directory path that matches "o-le-v7","a-le-v7","o-le-v7-g" and "a-le-v7-g" in the end,and then check if the contents of these matching directories contains one of *.so,*.o,*.a ,if none of them are present,print the directory path.How do i change the below script to do that?
#!/usr/bin/perl -w use strict; use warnings; use File::Spec; use strict; use warnings; while (<DATA>) { chomp; my ($dir, $ext) = split ' '; my $path = File::Spec->catfile($dir, "*.$ext") . "\n"; if (! glob($path)) { print "No '$ext' in $dir\n"; } }
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Finding directory paths for missing objs
by Khen1950fx (Canon) on Mar 13, 2011 at 05:10 UTC | |
by Anonymous Monk on Mar 13, 2011 at 06:17 UTC | |
Re: Finding directory paths for missing objs
by philipbailey (Curate) on Mar 13, 2011 at 16:51 UTC | |
by Anonymous Monk on Mar 13, 2011 at 18:45 UTC | |
by Anonymous Monk on Mar 13, 2011 at 20:17 UTC | |
by Anonymous Monk on Mar 13, 2011 at 18:42 UTC | |
by philipbailey (Curate) on Mar 14, 2011 at 08:06 UTC | |
Re: Finding directory paths for missing objs
by Anonymous Monk on Mar 13, 2011 at 02:12 UTC | |
by wind (Priest) on Mar 13, 2011 at 02:38 UTC | |
by Anonymous Monk on Mar 13, 2011 at 04:13 UTC |
Back to
Seekers of Perl Wisdom