sub adj3_gi { my $path='\\'; my $computer = "LAIN"; foreach(@_) { # skip if it doesn't start with either a space or backslash, or if it starts with " ." or " .." next if ((/^[^ \\]/) || (/^ {2}\.{1,2}\s/)); # process path if first char is '\' if (/^\\/) { chop; $path = "$_\\"; } # break apart returned directory and file info elsif (/^ {2}(.*?(\.([^\.]+?))?) {5} *([HDRSA]*) +(\d+) {2}(.*)/gi`) { #print "{$computer\:$path$1, ". (defined $3 ? $3 : "").", $4, $5, $6 }\n"; } } }