in reply to Re: Re: Re: Splitting strings
in thread Splitting strings

As you have verified that $test contains a string that has whitespace in it the only logical explanation is that the whitespace is not a \040 (space char) but rather is a \t tab char. Otherwise the split would be working as you can easily demonstrate. To split on tabs or spaces or newlines use /\s+/ or for tabs and spaces use /[ \t]+/.

($a, $b) = split /\s+/, $test;

cheers

tachyon

s&&rsenoyhcatreve&&&s&n.+t&"$'$`$\"$\&"&ee&&y&srve&&d&&print