http://www.perlmonks.org?node_id=995307


in reply to Some Basic Help.

$1 is the first bracketed match in a regular expression, you don't want that.

Why didn't you write simply my $predict = $_?

Another suggestion: use the 3 argument form of open.

if ($train = $predict) is also wrong: You have to use == when checking.

I'm too lazy to be proud of being impatient.