Hey guys,
So I'm doing a script that gets all the words from a line of a file.
I'm using the following regex:
@words = ($line =~ m/
+\s/g);
But I'm having trouble with the last word from the file, cuz it doesn't have a space or a new line char.
Any ideas on how to improve this?
UPDATE:
I just did it like this:
@words = ($line =~ m/