0 LIKES LikeUnLike
$dir = "/folder1/folder2/folder3"; >> Problem 1if(opendir(DIR,$dir)) {foreach my $filename (readdir DIR) {if($filename =~ /*.xml$/i) { >> Problem 2if(open(Open_Input,"$dir/$filename")) {#do whatever you wantI'm new in perl and have 2 problems with the above code. What i want is to open specific folders and searh for all the xml files. However in Problem1 the folder names changes for example folder2 may sometimes be folder8 or folder10 so i can't specify a fixed folder. Also I get an error in Problem 2 for searhing all the xml files in a folder please help???
Tags:
Report (0) (0) | earlier
Latest activity: earlier. This question has 2 answers.