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




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 => $new_name,
BinModeIn => 1
or do {
warn "Failed to gzip file: '$old_name': $GzipError";
next DOTDONE;
};
warn "File '$new_name' not created as expected"
unless -f $new_name and -s _;


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!

Your code, though, prompts a question on syntax. In 2 places you specify
an underscore without a '$' in front of it. This is the first time I've
seen this. Running 'perl -c' says the syntax is clean, but I couldn't
find any reference to that usage in perlsyn. Is the '$' implied because
of the context?

Can you please explain or point me to the doc? Thanks.

Are you using both 'strict' and 'warnings'?


I am using both 'strict' and 'warnings'. Doesn't everyone ;)

Thanks again.

richf
.



Relevant Pages

  • Re: Basic Newbie Question: Whats the ":=" operator for?
    ... As an example, take the MsgBox function. ... The full syntax is ... then I can put in just the prompt and title without ... Use the parentheses around the parameters only if you're ...
    (microsoft.public.word.vba.general)
  • Re: External Data from Stored Procedure with parameters
    ... It is not possible to get MSQuery to automatically prompt for the ... To be able to use MSQuery parameters, the SQL must be a simple SELECT ... written in MSQuery's own SQL dialect, rather than that odbc syntax or ... Using odbc's CALL syntax, ANSI's ...
    (microsoft.public.excel.programming)
  • Re: joining a hash of arrays
    ... the syntax. ... I cannot reproduce your problem. ... use strict; ... use warnings; ...
    (comp.lang.perl.misc)
  • Re: Cant stat e:: Unknown file or directory ???
    ... > for directory files. ... If it were a syntax issue, perl would tell you about it. ... I don't have a Windows server to test your ... > use warnings; ...
    (comp.lang.perl)
  • Re: CiderPress v2.3.1 released
    ... Import Applesoft BASIC programs from text files. ... In a 200+ line program I typed in from Nibble, I can't tell you how many illegal characters or bad syntax issues got imported in. ... I still hope you can detect syntax issues during import and prompt me before I have to keep going to the emulator and figuring out what the problem is. ...
    (comp.sys.apple2)