more useful options | |
PerlMonks |
Re: Archive::Tar is working with perl-5.8.7 but giving Out Of Memory error with perl-5.20.1by afoken (Chancellor) |
on Mar 30, 2015 at 13:08 UTC ( [id://1121825]=note: print w/replies, xml ) | Need Help?? |
if($tar_engine == undef) Not related to your problem, but that code does not do what you expect it to do. Numeric equal (==) forces numeric context on both sides, so essentially you are comparing $tar_engine with 0. Perl warns you about this problem if you use warnings. You want to use defined($tar_engine) instead of $tar_engine == undef. Another problem:
The scope of my $ret is limited to the block following if. Outside that block, $ret is either not defined at all or its value stays unchanged. I suspect that your script runs without strict and warnings, so there may be more hidden errors. Try adding use strict; and use warnings; to the top of your code and fix problems until perl stops whining. Alexander
-- Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)
In Section
Seekers of Perl Wisdom
|
|