open (READFILE, "<poem.txt") || die "Couldn't open file: $!"; $buffer = ""; $lines = 0; while(<READFILE>) { $chars += length($_); $lines++ ; my @word = split " ", $_; $word_cnt += @word; chomp($mystring); $mystring = $mystring += $_=~ s/\W//g; } print ("Lines: $lines\n"); print ("Words: $word_cnt\n"); print ("Characters: $chars\n"); print lc("$mystring\n");
In reply to Re^2: Removing characters
by Slug
in thread SOLVED Removing characters
by Slug
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |