in reply to A splitting question

I don't think you can do it as you are trying. According to perlvar, most of the $thingy variables for regexes don't count for regexes within a block, which is how I imagine split() treats them.

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.