On Fri, Dec 18, 2009 at 7:13 AM, Simphiwe Mkhize <smkh...@eccotours.biz>wrote:

> Here is my solution thank you for help
>
> ......
>
> &my_read_dms_booking_folders('c:/bookings') ;
>
> sub my_read_dms_booking_folders{
>
> my ($bookingspath) = @_ ;
>
> opendir(DIR, "$bookingspath") or die "cant open $bookingspath: $!\n";
>
> while(defined(my $folder = readdir(DIR))) {
>   if ($folder eq '.')  { next ; }
>   if ($folder eq '..') { next ; }
>     opendir(DIR_PHONE, "$bookingspath/$folder") or die "cant open
> $bookingspath/$folder: $!\n";         while(defined(my $phone_data =
> readdir(DIR_PHONE))){
>                   if (substr($phone_data,0,8) eq 'PHONELOG'){
>
> &my_read_data_file($bookingspath,$folder,$phone_data);
>        }
>  }   closedir(DIR_PHONE) ;
>
> }
>
> closedir(DIR) ;
>
>
For future reference, the File::Find module also traverses a directory tree.

-- 
Robert Wohlfarth

Reply via email to