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;
In reply to suppress errors from Archive::Tar by doubledecker
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |