[Raleigh-talk] Mysterious GLOB files

Jason Rice jrice at datacraftsolutions.net
Tue Jan 2 11:16:55 PST 2007


I have a set of scripts which cycle through some directories (on a
redhat linux machine) to process files. The code works fine, except for
creating GLOB(0x.......) files when the scripts complete. Anyone have an
idea on this?

 

Snippet follows:

 

opendir my $handle_dir, $baseDir;

# Get list of server folders

my @all_files;

my @folders = grep { not /[.][.]?|.*[.]\w+/xmsi } readdir $handle_dir;

foreach my $fld (@folders) {

            opendir my $sub_handle_dir, "$baseDir/$fld/processed";

            my @sub_folders = grep { /\d{15}/xmsi } readdir
$sub_handle_dir;

            foreach my $fld2 (@sub_folders) {

                        opendir my $xls_handle_dir,
"$baseDir/$fld/processed/$fld2/XML";

                        chdir "$baseDir/$fld/processed/$fld2/XML";

                        my @xls_files = grep { /\A.*[.]xml\z/xmsi }
readdir $xls_handle_dir;

                        foreach my $file (@xls_files) {

                                    # Move each file to the processed
directory structure

                                    chdir
"$baseDir/$fld/processed/$fld2/";

                                    my @args = ('mv',
"$baseDir/$fld/processed/$fld2/XML/$file", 

 
"$baseDir/$fld/processed/$fld2/XML/complete");

                                    my $ret = system(@args);

                                    if (!$ret) {

                                                #Process here

                                    }

                        }

                        closedir $xls_handle_dir;


            }

            closedir $sub_handle_dir;

}

closedir $handle_dir;

 

=======END CODE

 

=======BEGIN ls -l Result

-rw-r--r--    1 root     root            0 Jan  2 12:52 GLOB(0x9710bdc)

-rw-r--r--    1 root     root            0 Jan  2 12:49 GLOB(0x9d1ebdc)

-rw-r--r--    1 root     root            0 Jan  2 12:51 GLOB(0x9ee0bdc)

-rw-r--r--    1 root     root            0 Jan  2 12:50 GLOB(0x9f95bdc)

=======END ls -l Result

 

Thanks,

--JER

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.pm.org/pipermail/raleigh-talk/attachments/20070102/d0d25285/attachment.html 


More information about the Raleigh-talk mailing list