CGI/Perl Guide
|
Learning Center
|
Forums
|
Advertise
|
Login
Site Search:
in
Perl Guide
PerlGuru Forums
Learning Ctr
MAIN
INDEX
SEARCH
POSTS
WHO'S
ONLINE
LOG
IN
Home
:
Perl Programming Help
:
Intermediate
:
($a=($b=2)=3 ) returns 1 !?
Print Thread
ip
New User
Apr 15, 2008, 1:58 PM
Post #1 of 2 (402 views)
($a=($b=2)=3 ) returns 1 !?
Can't Post
So, I was sure that the result should be 3, but it's not. Can someone explain why $a is
1
after evaluating
Code
$a=($b=2)=3;
KevinR
Veteran
Apr 15, 2008, 11:51 PM
Post #2 of 2 (396 views)
Re: [ip] ($a=($b=2)=3 ) returns 1 !?
[
In reply to
]
Can't Post
looks like $a is a list in scalar context, which means it returns the number of items in the list. Just a guess though.
-------------------------------------------------
Announcements
PerlGuru Announcements
Perl Programming Help
Frequently Asked Questions
Beginner
Intermediate
Advanced
Regular Expressions
mod_perl
DBI
Win32 Programming Help
Fun With Perl
Perl Quizzes - Learn Perl the Fun Way
Perl Golf
Perl Poetry
Need a Custom or Prewritten Perl Program?
I need a program that...
I Need a Programmer for Freelance Work
Throw Down The Gauntlet
General Discussions
General Questions
Feedback
Tutorial/Article Suggestions for The Learning Cent
Internet Security
Other Programming Languages
Javascript
PHP
Search
this forum
this category
all forums
for
All words
Any words
Whole Phrase
(
options
)
Powered by
Gossamer Forum v.1.2.0
Web Applications
&
Managed Hosting
Powered by Gossamer Threads
Visit our
Mailing List Archives