my @list = ( 'file_A.txt', 'file_B.txt' );
zip \@list => 'name.zip'
or die "zip failed: $ZipError\n";
Core module IO::Compress::Zip (available since v5.9.4) provides a zip function that takes a reference to a list (i.e. \@list not @list) and the name of the zip file. If it fails, $ZipError contains the error message. See documentation for details.