The '\' in your regular expression does nothing "twice" because 1) it's invisible because it's not escaped with another '\' and 2) $_ will contain only the filename, not any of the separtors.
Your print can be done with:
Probably. This would deiniftely be OK on *nix, but with the odd newline sequence in Win32, it may not act as expected...print CSV " SERVER01.dbdev1=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOS +T=SERVER01)(PORT=1527)))(CONNECT_DATA=(SID=dbDEV1))) SERVER01.dbdev2=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOS +T=SERVER01)(PORT=1527)))(CONNECT_DATA=(SID=dbDEV2))) SERVER01.dbintst=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HO +ST=SERVER01)(PORT=1527)))(CONNECT_DATA=(SID=dbINTST))) SERVER01.dbmstr=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOS +T=SERVER01)(PORT=1527)))(CONNECT_DATA=(SID=dbmstr))) ";
But I really don't know why it's so slow. Maybe you should count how many times wanted() gets called - perhaps you just have a god-waful numbe rof files on your system. --Bob Niederman, http://bob-n.com
In reply to Re: Speedy directory searching
by bobn
in thread Speedy directory searching
by ironpaw
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |