shug94 has asked for the wisdom of the Perl Monks concerning the following question:
The output I get is:use IO::Compress::Gzip; #... my $localFilePath = 'C:/adi_vsfz/CTIP/transferFiles/20091015_Timetab +le.txt'; my $content; #Open a file handle to the file. if(open(FILE_TO_TRANSFER, $localFilePath)) { my @transferFileContents = <FILE_TO_TRANSFER>; foreach(@transferFileContents) { $content .= $_; } close(FILE_TO_TRANSFER); my $newContent; IO::Compress::Gzip::gzip($content, $newContent); print("<BR><BR>\n".$content."<BR><BR>\n"); print($newContent."<BR><BR>".length($newContent)."\n"); if($newContent == undef) { print('$newContent is undef'."<BR>\n"); } }
Timetable Info 0 $newContent is undef
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: IO::Compress::Gzip blank output
by Gangabass (Vicar) on Sep 06, 2009 at 06:39 UTC | |
by shug94 (Sexton) on Sep 06, 2009 at 23:36 UTC | |
Re: IO::Compress::Gzip blank output
by Sewi (Friar) on Sep 06, 2009 at 12:11 UTC | |
Re: IO::Compress::Gzip blank output
by graff (Chancellor) on Sep 07, 2009 at 02:46 UTC | |
Re: IO::Compress::Gzip blank output
by Burak (Chaplain) on Sep 07, 2009 at 00:27 UTC | |
by shug94 (Sexton) on Sep 07, 2009 at 01:51 UTC |