I may be mistaken, but the first output you are processing looks suspiciously like the output of Window's (DOS's) dir command.
If you're capturing the output of dir merely to read it with Perl, it may be simpler to open the directory and read it yourself. If this is the case, the functions openddir, readdir and closedir will be of interest.
If you are looking at a large directory tree (that is, dir /s), you will probably find that a module such as File::Find::Rule is more useful.
The idea is to make the processing a little more self-contained. No need to have a batch file that does some stuff and then calls Perl to do the rest, when Perl could no doubt do the entire job just as easily.
• another intruder with the mooring in the heart of the Perl
In reply to Re: Two regex problems (easy)
by grinder
in thread Two regex problems (easy)
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |