in reply to SOLVED Removing characters
The split in
could be rewritten asmy @word = split " ", $_;
this will have the effect of removing all white space and periods and giving a list of lower case words. You need to read it backwards, the split happens before the map.my @words = map { lc } # convert to lower case split /[\s.]+/, $_; # split on white space and "."
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Removing characters
by Slug (Acolyte) on Jan 22, 2008 at 15:05 UTC | |
by hipowls (Curate) on Jan 22, 2008 at 21:48 UTC |