in reply to A splitting question
The <FILE> should make it so that the newline is always and only at the end. (unless you changed $/)Why not:
while(<FILE>){ for my $myword (split(/\s+/)){ #do stuff } #There's a newline now }
Update: BTW, $/ will always equal "\n" unless you change it. It's the value that the <FILE> constructor uses to split on, not what split uses.
|
|---|