Recently I came across this Perl expression on a blog, unable to grab it purpose.
my $success = 1;
$success &&= $insert_handle->execute($first, $last, $department);
$success &&= $update_handle->execute($department);
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
is short for
(Except that
EXPR1is only evaluated once.*)The provided code
could also have been written as:
or
* — This matters if
EXPR1has side-effects, which could very well happen if it’s a magical variable or an lvalue sub.