Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: How to get string from array from module?

by hippo (Canon)
on Feb 08, 2018 at 14:45 UTC ( #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
Node Status?
node history
Node Type: note [id://1208717]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (5)
As of 2018-06-19 05:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Should cpanminus be part of the standard Perl release?



    Results (111 votes). Check out past polls.

    Notices?