I have a log file which consists of 3 dots. I need to search it under a directory...

aman

New member
...using PERL.? I have 3 log files in a directory out of which the names of 2 log files consists of 4 or more dots. Only 1 log filename includes 3 dots eg: aman.deepak.pavan.log. How can I search for that file only and move it to a particular Folder using PERL???? Please help.

NOTE: I dont want to hardcode the File name in the script.
 
I don't know the syntax for Perl. However in DOS you would do a wildcard search like this - *.*.*.log

In C I would get the filename then tokenize it with the '.'s, if there are 4 tokens and the 4th one is 'log' you've found it.
 
Back
Top