I want to get a directory listing, and right now it's on this computer (windows), and I need to either remove all the <DIR> or just escape them in an html sense (not sure how to do this, <!-- --> ??). I'm not sure if I need to escape the actual < and > within the regex as well. Well here is what I have and of course it doesn't work, if anyone could clean it up for me:
# these are only getting things in directory tournaments which begin with "t"
@output = system("dir tournaments\\t*");
# @output = system("ls tournaments/t*");
foreach (@output) {
# instead of completely removing this i'd like to just "escape" it html-wise.
$_ =~ s/<DIR>//g;
# sorry the space is only there because
was making a new line (in this post)
print "$_< BR>\n"; }
# these are only getting things in directory tournaments which begin with "t"
@output = system("dir tournaments\\t*");
# @output = system("ls tournaments/t*");
foreach (@output) {
# instead of completely removing this i'd like to just "escape" it html-wise.
$_ =~ s/<DIR>//g;
# sorry the space is only there because
was making a new line (in this post)
print "$_< BR>\n"; }