Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: If 6 Was 9

by LanX (Saint)
on Oct 15, 2018 at 18:16 UTC ( [id://1224056]=note: print w/replies, xml ) Need Help??


in reply to If 6 Was 9

> Does that look strict? :-)

It does: = is an assignment operator, and has higher precedence than comma , .

I haven't run your code, but I suppose it's just printing the JAPH phrase after assigning "Just" to 4 variables.

Since I'm using auto-indentation - which is emphasizing multi-line commands, I would have noticed your bug immediately.

Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery FootballPerl is like chess, only without the dice

update

s/Yet/Just/

Replies are listed 'Best First'.
Re^2: If 6 Was 9
by LanX (Saint) on Oct 15, 2018 at 23:21 UTC
    > = is an assignment operator, and has higher precedence than comma , .

    probably a better demonstration:

    >perl use strict; use warnings; my $J='Just', my $A='Another', my $P='Perl', my $H='Hacker'; print "$J $A $P $H"; __END__ Just Another Perl Hacker

    Cheers Rolf
    (addicted to the Perl Programming Language :)
    Wikisyntax for the Monastery FootballPerl is like chess, only without the dice

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1224056]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (3)
As of 2024-04-24 22:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found