Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask

Why Perl boolean expression sometimes treated as lvalue?

by vsespb (Chaplain)
on Feb 08, 2013 at 11:28 UTC ( #1017801=perlquestion: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download

  1. or download this
    my $a = 1;
    my $b = 2;
    $a && $b = 3;
  2. or download this
    use strict;
    use warnings;
    my $y = 5;
    a($x && $y);
    print "$x\n";

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://1017801]
Approved by vinoth.ree
Front-paged by RMGir
vrk takes a cookie from the platter on the sideboard.
Eily thinks vrk is a cookie monster
talexb thinks the term 'cookie monster' is unnecessarily drogatory ;) and takes a cookie as well. Mmmm. Delicious cookies.
[davido]: A tool as pretentious as Test::Perl::Critic ought not fail to install because one of its dependencies failed to pull in List::MoreUtils.
[davido]: ...and

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (13)
As of 2017-04-25 15:58 GMT
Find Nodes?
    Voting Booth?
    I'm a fool:

    Results (458 votes). Check out past polls.