use Archive::Unrar qw(list_files_in_archive %donotprocess process_file); @files =list_files_in_archive( file=>"C:/perl2exe/For perl 5.10.1/test.rar" ,undef); foreach my $file (@files) { if ($file =~ /\.txt\z/) { $result = process_file( file=>'C:/perl2exe/For perl 5.10.1/test.rar', password=>undef, output_dir_path=>"C:/extract/", #selection=>ERAR_MAP_DIR_YES, #callback=>$callback ); } }