Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: why the value of count will be change?

by toolic (Bishop)
on May 09, 2018 at 00:25 UTC ( [id://1214246]=note: print w/replies, xml ) Need Help??


in reply to why the value of count will be change?

My question is why the value of count is just the number of the data in @?
The reason is found in List value constructors:
Note that the value of an actual array in scalar context is the length of the array; the following assigns the value 3 to $foo:
@foo = ('cc', '-E', $bar);
$foo = @foo; # $foo gets 3
  • Comment on Re: why the value of count will be change?

Replies are listed 'Best First'.
Re^2: why the value of count will be change?
by yueli711 (Sexton) on May 09, 2018 at 11:53 UTC

    Thank you so much!

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (2)
As of 2024-04-19 19:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found