|
|
| Just another Perl shrine | |
| PerlMonks |
Re: finding file in a zip fileby Paladin (Curate) |
| on Jan 31, 2005 at 19:17 UTC ( #426698=note: print w/ replies, xml ) | Need Help?? |
|
You have your .*$file in single quotes, which means the variable isn't being interpolated, so it's looking for a file that matches zero or more of anything, followed by the dollar sign, followed by the word file. Try changing those to double quotes, and that part will work fine. As for the rest... The extractToFileNamed() method works on the return values of membersMatching, and not on strings. You probably want something like:
Also, $#files gives you the index of the last element, not the number of elements in the array. For that you want my $numfiles = @files
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||