in reply to Re: Compressing files on an entire disk
in thread Compressing files on an entire disk

ok, I got the search to print a list of files, but I am getting a syntax error when I try to zip them individually.
my @files = find( file => 'name' => [ ], size => '', in => $directory ); # @output="@files.zip"; my @status = zip @files => @output or die "zip failed: $ZipError\n";

Replies are listed 'Best First'.
Re^3: Compressing files on an entire disk
by hippo (Archbishop) on Feb 07, 2023 at 22:35 UTC
    for my $src (@files) { my $status = zip $src => "${src}.zip" or die "zip failed: $ZipError\n"; } # And, if you're confident unlink @files;

    You cannot just arbitrarily throw arrays into subroutines which explicitly require scalar arguments and expect it to work.


    🦛