in reply to Optical drive contents listing problem

I have looked at the first script only. It contains the following:

foreach my $file (@dirlisting) { ... DIR: foreach my $dfile (@ddir) { ... if (-d $dpath) { ... push @dirlisting,$dpath; ... } ... } ... }

pushing to array @dirlisting while iterating through it in an (outer) foreach loop is a recipe for trouble. From perlsyn#Foreach-Loops:

If any part of LIST is an array, foreach will get very confused if you add or remove elements within the loop body, for example with splice. So don't do that.

Hope that helps,

Athanasius <°(((><contra mundum Iustus alius egestas vitae, eros Piratica,