Perl implementation of Linear Threshold Units