use Win32::Process; print "Enter the subdirectory you'd like to parse: "; $path = <STDIN>; chomp( $path ); $prefix = "C:\\Projects\\Source\\"; $path = "$prefix$path"; $path = "." unless $path; opendir( DIR, $path ) or die "Can't open $path: $!"; while ( $entry = readdir( DIR ) ) { $type = ( -d "$path\\$entry" ) ? "dir" : "file"; # $path is crucia +l! if( $entry =~ /\.h|\.c$/ ){ print "$entry\n"; } } closedir( DIR );
In reply to RE: file wildcards in Win32
by barZion
in thread file wildcards in Win32
by jjhorner
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |