I have a file with a list of subfolders. The list was created using dir
and each entry is like thus:
12/12/2005 04:38 AM <DIR> A Perfect Circle
I then created a simple script that I hoped would eliminate everything
prior to the last bit of text which follows the big space.
open FILE, "H:\My Music\folderlist.txt";
foreach my $line (readline FILE) {
$line =~ s/^.*\s//g;
open FILE2, "H:\My Music\artists.txt";
print FILE2 $line . "\n";
close FILE2;
}
close FILE;
Not only do I think the regex is very wrong, but it isn't doing
anything. If I had to guess, it is saying to replacy everything up to
the first space with nothing. While this isn't what I want it to do,
having it do that would probably be a good step in the right direction.
However, it won't even do that.
What am I doing wrong here?
Mathew
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/