in reply to Extracting files from .7z using Perl
Not sure what you are doing with the glob statements. Try this test program which should list the files in an archive that match the invoic_b2c etc pattern
poj#!perl use strict; use warnings; my $base = 'D:/Some/Specific/Folder/Archive/'; my $archive = $base.'Gridfee05.7z'; my $exe = '"C:/Program Files/7-Zip/7z.exe"'; my @files = grep /invoic_b2c_201\d{5}.*\.txt/, qx "$exe l $archive"; print scalar @files." files found in $archive - see filelist.txt\n\n"; open OUT,'>',"filelist.txt" or die "$!"; print OUT join "\n",@files; close OUT;
|
|---|