in reply to Re: The CORRECT thinking behind the {}s and the ()s.
in thread The CORRECT thinking behind the {}s and the ()s.

Just to confuse things more... :)

Either learn them or just use (), and if you need a reference, reference the hash or array you created with a backslash. (em added)

Just be careful that you remember that that means:

%hash = (foo => 'foo', bar => 'bar'); $href = \%hash;

And not:

$href = \(foo => 'foo', bar => 'bar');

Because the latter won't do what you might think. (It would be the same as:

$href = (\'foo', \'foo', \'bar', \'bar'); # which reduces to... $href = \'bar';

which is almost certainly not what you want.)

bbfu
Black flowers blossum
Fearless on my breath