Re: IO::Compress::Gzip creates empty file

2008-01-31 Thread Tom Phoenix
On Jan 31, 2008 10:06 AM, RICHARD FERNANDEZ <[EMAIL PROTECTED]> wrote: > gzip "$company.$ext.$date" => "$company.$ext.$date.gz", > BinModeIn=> 1 or do { > warn "Failed to gzip file: $company.$ext.$date: > $GzipError\n"; >

RE: IO::Compress::Gzip creates empty file

2008-01-31 Thread RICHARD FERNANDEZ
Hi Tom, thanks for the reply. > my $old_name = "$company.$ext.$date"; > my $new_name = "$old_name.gz"; > warn "File '$old_name' is empty" if -z $old_name; > warn "File '$old_name' isn't really a file" unless -f _; > unlink $new_name; # whether it's there or not > gzip $old_name => $

Re: IO::Compress::Gzip creates empty file

2008-01-31 Thread Tom Phoenix
On Jan 31, 2008 12:08 PM, RICHARD FERNANDEZ <[EMAIL PROTECTED]> wrote: > I made the changes you suggested and re-ran it. The program just comes > back to a prompt. No warnings, no nothing, and still no data in the > gzip'd file! No warnings? H Are you sure your program actually ran the ne

Re: IO::Compress::Gzip creates empty file

2008-01-31 Thread John W. Krahn
RICHARD FERNANDEZ wrote: Hi Tom, thanks for the reply. my $old_name = "$company.$ext.$date"; my $new_name = "$old_name.gz"; warn "File '$old_name' is empty" if -z $old_name; warn "File '$old_name' isn't really a file" unless -f _; unlink $new_name; # whether it's there or not gzip

RE: IO::Compress::Gzip creates empty file

2008-01-31 Thread RICHARD FERNANDEZ
> No warnings? H Are you sure your program actually ran > the new code? That should have generated at least one > warning. Is there any chance you've redirected or closed the > STDERR filehandle? You can always add a line like this during > development, if you need to be sure the new co

Re: IO::Compress::Gzip creates empty file

2008-01-31 Thread Paul Johnson
On Thu, Jan 31, 2008 at 05:02:44PM -0500, RICHARD FERNANDEZ wrote: > I hate to do it, but I guess I'll have to shell out. Can't spend any > more time on this, unless anyone > else has any more ideas? If you've just written the file, have you closed the filehandle and checked the return value? I

Re: IO::Compress::Gzip creates empty file

2008-01-31 Thread Rob Dixon
RICHARD FERNANDEZ wrote: No warnings? H Are you sure your program actually ran the new code? That should have generated at least one warning. Is there any chance you've redirected or closed the STDERR filehandle? You can always add a line like this during development, if you need to be

Re: IO::Compress::Gzip creates empty file

2008-01-31 Thread Tom Phoenix
On Jan 31, 2008 2:02 PM, RICHARD FERNANDEZ <[EMAIL PROTECTED]> wrote: > Immediately before your test code I have a line that reads: > > print "Creating gzip'd archive\n"; > > and after the job runs, I definitely end up with a .gz file, just an > empty one. I was really hoping you were goi

RE: IO::Compress::Gzip creates empty file

2008-02-01 Thread RICHARD FERNANDEZ
> If you've just written the file, have you closed the > filehandle and checked the return value? > > Paul Johnson - [EMAIL PROTECTED] > http://www.pjcj.net > Well, I've just learned a valuable lesson (or two), which is, after all, what I'm on this list for :) Just prior to the code I've alrea