rsFalse has asked for the wisdom of the Perl Monks concerning the following question:
output:#!/usr/bin/perl -l use strict; use warnings; map { print "[$_]" } scalar( 1 == 0 ), ~~ '', ~~ scalar( 1 == 0 ), ~~ ( 1 == 0 );
It is strange for me, that print ~~ scalar( 1 == 0 ) outputs '0' even when scalar( 1 == 0 ) corresponds to ''.[] [] [0] [0]
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Inchworm vs scalar: on boolean false value
by Eily (Monsignor) on Dec 17, 2019 at 14:20 UTC | |
by haukex (Archbishop) on Dec 17, 2019 at 21:55 UTC | |
|
Re: Inchworm vs scalar: on boolean false value
by LanX (Saint) on Dec 17, 2019 at 13:59 UTC | |
by Fletch (Bishop) on Dec 17, 2019 at 14:32 UTC | |
by Eily (Monsignor) on Dec 17, 2019 at 14:30 UTC | |
by LanX (Saint) on Dec 17, 2019 at 15:59 UTC | |
|
Re: Inchworm vs scalar: on boolean false value
by Eily (Monsignor) on Dec 17, 2019 at 14:44 UTC | |
|
Re: Inchworm vs scalar: on boolean false value
by LanX (Saint) on Dec 17, 2019 at 14:15 UTC |