First off I must say that I am very thankful that a site like this exist! Plenty of great help and information out here. Now on to my question.
I want to use perl grep to pull information from an array. The array contains a list of files with the following name schema XXXX.BTS.200902021400.XXX_XXXXpm. Now when I create the grep statement.
opendir(DIR,"$inputDir");
my @dirList = readdir(DIR);
closedir(DIR);
my @list = grep /*$classType.$yearMonth????00.XXX_XXXXpm/, @dirList;
Now I am not looking to match the first four characters, the match would start from BTS until the end of the file. the $classType variable would contain BTS, $yearMonth would contain 200902. The four questions marks are to match any date/day and hour and the "00" is there to match for minutes. Now for the life of me I cannot figure out how to build this regular expression so that it will search for "BTS.200902????00.XXX_XXXXpm".
Any help that you guys could provide would be greatly appreciated. I just need a point in the right direction.
Thanks again.