in reply to Re^3: Sorting issue
in thread Sorting issue

Hi Aaron,

Thanks! It worked with:

split(' ', $line).

Replies are listed 'Best First'.
Re^5: Sorting issue
by aaron_baugher (Curate) on Nov 05, 2011 at 13:45 UTC

    Glad that helped. If you're having trouble using $line in place of $_, that's probably because if you give split a variable, you have to give it a pattern first. So you could do split ' ', $line; to use split's special case where giving it a single space as the pattern argument makes it split on whitespace like it does when you give it no arguments.