perl, if condition and logic AND
OK

    my $login='anybody';
    exit if $login ne 'root';

NOT OK. Why?

    my $login='anybody';
    (print "erorr" && exit) if $login ne 'root';

p.s. i know about if (condition) {action}. I just want to know about current problem.
perl, if condition and logic AND
===

OK

    my $login='anybody';
    exit if $login ne 'root';

NOT OK. Why?

    my $login='anybody';
    (print "erorr" && exit) if $login ne 'root';

p.s. i know about if (condition) {action}. I just want to know about current problem.