[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Omaha.pm] Log files might be bz2'd hack



On Thu, Jun 09, 2005 at 11:23:03AM -0500, Jay Hannah (jhannah@omnihotels.com) wrote:
> my $glob = "/junk/__peglogs/comserver-trans-a.log.$y$m$d";
> my $cat = "cat";
> if (`ls $glob*.bz2 2>/dev/null`) {
>    $cat = "bzcat";
> }

You don't need to use `ls` to get a list of files.

my @files = glob( "$glob*.bz2" );

-- 
Andy Lester => andy@petdance.com => www.petdance.com => AIM:petdance