in reply to Writing compact conditional regex's
while ($dir =~ /,\d{3} ((.*?)\.avi)/gi) { # work with $1 here }
Since I have no MS DOS or descendent operation systems available here, I don't know exactly how the data looks, so I don't know if the regexes can be simplified or merged.
A perlish way to transverse directories recursively is to use the core module File::Find, which eliminates the use for parsing dir /s output entirely, and makes the script more portable across operation systems.
|
|---|