sub parenth { my ($string) = (@_); my $l_count = () = ($string =~ /\(/g); my $r_count = () = ($string =~ /\)/g); if ($l_count != $r_count) { print "There is no balance on this line! Did you format it correctly???"; return 0; } else { print "There is balance in this universe"; return 1; } }