Sorry, I was not aware of your name. Your tag line is cool. :) So far I have written this much of code. The power directory has two directories and in those directories. There are 130 sub directories for each directories. I want to go to each sub directory and get a pattern from a text file in that directory. I am stuck with how to check directories and get that perticular pattern. mdp is a pattern. Your help will be greatly appreciated.
------------------------------------------#!usr/bin/perl; use strict; use warnings; $| = 1; sub main{ my $directory = '/nfs/fm/stod/stod1031/w.eakanoje.101/power/'; opendir (DIR, $directory) or die "Cannot open directory $directory" +; # while (my $file = readdir(DIR)){ # next if($file =~ m/^\./); # print "$file\n"; # } my @out = glob("mdp*"); print "@out\n"; } main();
In reply to Re^4: Reading Directory and getting pattern from a file
by Eshan_k
in thread Reading Directory and getting pattern from a file
by Eshan_k
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |