in reply to Re^3: Ordering of parameters - Re^9: Converting Unicode
in thread Converting Unicode

I'm lost at the very first line of your example code where it appears you are assigning a hash to a scalar.

I feel your pain!
For a long time, this sort of syntax was alien to me. But it is worth taking time to understand.

$config = { verbosity => 3, logger => 12, };

This is assigning an anonymous hashref.
Consider this instead:

# Create a hash my %myhash = ( 'verbosity', 3, 'logger', 12 ); # Assign it to a hashref my $myhashref = \%myhash; # To get the same result # without the hash variable my $myhashref = { verbosity => 3, logger => 12, };

For many years, references were beyond me.

It is easy to just say that we don't understand them and dismiss that as the way that it will always be. This is what Carol Dweck describes as a "Closed Mindset". The alternative is to reframe the problem. Instead, say that we don't know how to do it yet but we can learn - it might be difficult, but it is possible. Then the only question is whether one is prepared to put in the effort and be humble enough to ask for help and receive wise counsel from those who provide it without getting defensive when information and methods that don't make sense are presented. Nothing makes sense until it has been learnt...that's why people used to think the Earth was flat...

I asked here in the Monastery about references. Several Monks gave conceptual models that didn't make sense and examples that I didn't understand. I tried to use references in test code and failed. I tried changes, sometimes at random, until I got something working or, at least, giving a different error message. I asked if my understanding of what was happening was right. Slowly I grew to understand...

You too can understand references, OOP and trigonometry...but it requires an open mindset...