# New Ticket Created by  Zoffix Znet 
# Please include the string:  [perl #131499]
# in the subject line of all future correspondence about this issue. 
# <URL: https://rt.perl.org/Ticket/Display.html?id=131499 >


In none of these cases is the use of variables actually useless:

<Zoffix__> m: my ($sensor1, $sensor2, $sensor3); $sensor1 notandthen $sensor2 
notandthen $sensor3 notandthen 'did not find a working sensor!'.say;
<camelia> rakudo-moar 64e898: OUTPUT: «WARNINGS for <tmp>:␤Useless use of 
$sensor3 in sink context (line 1)␤Useless use of $sensor2 in sink context (line 
1)␤did not find a working sensor!␤»

<Zoffix__> m: my ($sensor1, $sensor2, $sensor3) := (1, 2, 3); $sensor1 andthen 
$sensor2 andthen $sensor3 andthen 'did not find a working sensor!'.say;
<camelia> rakudo-moar 64e898: OUTPUT: «WARNINGS for <tmp>:␤Useless use of 
$sensor3 in sink context (line 1)␤Useless use of $sensor2 in sink context (line 
1)␤did not find a working sensor!␤»

<Zoffix__> m: m: my ($sensor1, $sensor2, $sensor3); $sensor1 orelse $sensor2 
orelse $sensor3 orelse 'did not find a working sensor!'.say;
<camelia> rakudo-moar 64e898: OUTPUT: «WARNINGS for <tmp>:␤Useless use of 
$sensor3 in sink context (line 1)␤Useless use of $sensor2 in sink context (line 
1)␤did not find a working sensor!␤»

Reply via email to