my %ext; while (<>) { next unless /\S/; /(\.[^.]+)?$/; $ext{lc($1||"")}++; } printf "%-6s %d\n",$_||'<NONE>',$ext{$_} for sort keys %ext;
Remove the lc() if you are on a case sensitive file system.
In reply to Re: Hash ref and file extensions
by demerphq
in thread Hash ref and file extensions
by rupesh
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |