I still can't get it to pick up brackets. Please help?
Is there an ASCII equivelent I can search for.
open (READFILE, "<readme.txt") || die "Couldn't open file: $!";
$buffer = "";
while(<READFILE>) {
#print $_;
$commas++ while ($_ =~ m/,/g);
$fullstops++ while ($_ =~ m/\./g);
$openbracket++ while ($_ =~ m/\[/g);
$closedbracket++ while ($_ =~ m/\]/g);
$hyphens++ while ($_ =~ m/-/g);
}
print ("$commas commas\n");
print ("$fullstops full stops\n");
print ("$openbracket open brackets\n");
print ("$closedbracket closed brackets\n");
print ("$hyphens hyphens\n");
|