Maybe by adding a second call to retrieve .htm files?
use File::Find::Rule; my @files = File::Find::Rule->file() ->name( '*.xml' ) ->in( "." ); foreach $fname (@files) { print $fname; } @files = File::Find::Rule->file() ->name( '*.htm' ) ->in( "." ); foreach $fname (@files) { print $fname; }
Honestly, you seem to be asking quite basic questions that resemble quite a lot some homework questions or questions a corrector would ask of you if you copied some code from your coeds. That's also why I'm giving you a quite suboptimal solution. You can find a much better solution by reading the documentation of File::Find::Rule.
In reply to Re: Listing various types of files
by Corion
in thread Listing various types of files
by l.frankline
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |