http://www.perlmonks.org?node_id=516574


in reply to Counting the Extensions of the Directory

E:\tmp>ls 1gfJaJTeoh CFG1584.tmp CFG1587.tmp EScan ExchangePerflog_8484fa31f2d96a21cfcccd43.dat Perflib_Perfdata_784.dat SCP1D28.tmp SCPA62.tmp VBE WINWORD.log add_service_authentication_columns.sql add_service_authentication_columns.sql.bak ch01.pdf create_export_tables-2.sql create_export_tables-2.sql.bak en-only.rws.swp jusched.log msohtml msohtml1 perldoc_BDeparse_T439ed4fb_d50b1.txt perldoc_perlfunc_T439eb5b6_bc83c.txt plugtmp svn000.tmp.pl tmp158D.exe tmp158D.tmp tmp158E.tmp tmp1592.tmp tmp180E.tmp tmp1811.tmp ~DF67F.tmp ~DF68C.tmp ~DF723C.tmp ~DF850E.tmp ~DFDDFC.tmp ~WRD0828.doc ~WRF2409.tmp ~WRS0003.tmp ~WRS0004.tmp E:\tmp>ls | grep -oE "\.\w+$" | sort -u .bak .dat .doc .exe .log .pdf .pl .sql .swp .tmp .txt .xls E:\tmp>

(GNU grep 2.5.1)