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



On Jan 31, 2008 12:08 PM, RICHARD FERNANDEZ <rfernandez@xxxxxxxxx> 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? Hmmmm.... 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 code is being reached and that warnings are showing up:

warn "Yes; execution does reach this point";

Your code, though, prompts a question on syntax. In 2 places you specify
an underscore without a '$' in front of it.

That's the special underscore filehandle that's used in stat() and
filetests. Briefly, it means "the same file as we just tested", but
without going back to the OS to ask again.

http://perldoc.perl.org/functions/-X.html

Cheers!

--Tom Phoenix
Stonehenge Perl Training
.



Relevant Pages

  • RE: IO::Compress::Gzip creates empty file
    ... next DOTDONE; ... back to a prompt. ... Your code, though, prompts a question on syntax. ... I am using both 'strict' and 'warnings'. ...
    (perl.beginners)
  • Re: Delete/Update prompts
    ... error where you're presented with the good ol' "Debug or End" prompt? ... I'm in the habit of encapsulating the query to ensure that the warnings are always turned back on afterward as there are times that I want to see them, esp If I'm developing something or if theres the possibility that the user may run a query. ...
    (microsoft.public.access.modulesdaovba)
  • Re: "tree" view of directory
    ... > If that were the case, this perl would produce nothing: ... > use strict; ... > use warnings; ... > carriage return before it prints the prompt. ...
    (comp.lang.perl.misc)
  • Re: newbie: specifying default text for STDIN keyboard input?
    ... don't insert the text at the prompt line): ... use warnings; ... #DIM VARIABLES ... sub PromptUser2 ...
    (comp.lang.perl.misc)
  • Re: Preventing prompts from appearing with DoCmd
    ... which will *not* prompt with any warnings. ... jerryk wrote: ... In one of my forms I need to execute the following line to create a temp ...
    (microsoft.public.access.formscoding)