Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: How to get string from array from module?

by hippo (Bishop)
on Feb 08, 2018 at 14:45 UTC ( [id://1208717]=note: print w/replies, xml ) Need Help??


in reply to How to get string from array from module?

our @COLOR_MAGENTA = [0.82745,0.21176,0.50980]; # This is an array, yes?!

No. The term on the right of the equals sign is an array reference, not an array. You assign that to the term on left which is an array so what you end up with is the array @COLOR_MAGENTA the first and only item of which is an array reference which itself has 3 items.

Have you read either or both of perlreftut and perlref? References are a very powerful tool but you do need to know how to use them otherwise you will end up with a lot of similar issues.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (3)
As of 2024-04-25 07:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found