in reply to Glob problem

I think your problem lies here:

for my $a (</home/www/*/logs/weekly>) { substr($a,-7)=" "; # <<< here
You are trying to get rid of the last part of the path, I think your log files are stored in /home/www/*/logs/... But you are introducing an extra space by your substr command, it should be either
substr($a,-7)= ""; # empty string! # or let the os handle the path $a .= '/..';

Another thing, could you make sure next time that your code does not contain so many newlines, that makes it horribly hard to read, imho. Thanks.

-- Hofmator

Replies are listed 'Best First'.
Re: Re: Glob problem
by wylie (Novice) on Aug 21, 2001 at 16:34 UTC
    Many thanks.

    Adding substr($a,-7)= ""; # empty string sorted things out

    Apologies for all the newlines. I'lll try and sort that out in future postings.