in reply to Re^3: Reading Directory and getting pattern from a file
in thread Reading Directory and getting pattern from a file

Sorry I was not aware its not your name and yes tag line is cool. So far I have this much. code, I want to go into subdirectories from there. and "mdp" is a pattern I want to match. Power artist has directories and in those there are several sub directories I just want to traverse and get the line from the file in those sub-directories. ---------------------------------------- 1 #!usr/bin/perl; 2 3 use strict; 4 use warnings; 5 6 7 $| = 1; 8 9 10 sub main{ 11 12 my $directory = '/nfs/fm/stod/stod1031/w.eakanoje.101/power_artist_2/'; 13 opendir (DIR, $directory) or die "Cannot open directory $directory"; 14 # while (my $file = readdir(DIR)){ 15 # next if($file =~ m/^\./); 16 # print "$file\n"; 17 # } 18 19 my @out = glob("mdp*"); 20 21 print "@out\n";
  • Comment on Re^4: Reading Directory and getting pattern from a file

Replies are listed 'Best First'.
Re^5: Reading Directory and getting pattern from a file
by GotToBTru (Prior) on Feb 10, 2015 at 18:19 UTC

    Please put <c> ...</c> tags around your code. It is unreadable.

    Dum Spiro Spero