in reply to Idiomatic Split to Scalar Conversion

You could use $count = $str =~ s/(pat)/$1/g, although that matches and replaces uselessly.

_____________________________________________________
Jeff[japhy]Pinyan: Perl, regex, and perl hacker, who'd like a (from-home) job
s++=END;++y(;-P)}y js++=;shajsj<++y(p-q)}?print:??;