doubledecker has asked for the wisdom of the Perl Monks concerning the following question:
Monks,
I'm using Archive::Tar Modules to extract tar files. For the first time, program is running successfully but when i run again, it is displaying errors on the screen. How to suppress them not to display on the screen and have a silent extraction
Also, how to find out return status of extraction?
use strict; use Archive::Tar; use File::Path qw(make_path remove_tree); my $file = '/home/rocket/sample.tgz'; my $dir = '/var/tmp/extract'; make_path("$dir") unless -d "$dir"; chdir($dir); my $ocs = Archive::Tar->new($file); my $stat = $ocs->extract(); print $stat;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: suppress errors from Archive::Tar
by Anonymous Monk on Jun 19, 2012 at 10:37 UTC | |
by doubledecker (Scribe) on Jun 26, 2012 at 10:20 UTC | |
by Anonymous Monk on Jun 26, 2012 at 10:23 UTC | |
by doubledecker (Scribe) on Jun 26, 2012 at 11:36 UTC |