in reply to Re^2: Using exists to check element in array
in thread Using exists to check element in array

> messier when it comes to string concatenation because of the double quotes I find I need to put around the keys.

In Perl keys are auto-quoted!

I.e. this "txt $h{key} txt" works fine.

You are also free to use hash-slices for multiple values, like "txt $h{@keys} txt"

update

From Learning Perl

Cheers Rolf
(addicted to the Perl Programming Language :)
see Wikisyntax for the Monastery

Replies are listed 'Best First'.
Re^4: Using exists to check element in array
by david (Novice) on Jan 28, 2024 at 10:51 UTC
    Thanks, I re-checked and the double quotes were an error!!! Glad you inspired me go back and check and find this. Doh! Thanks. Much easier to read now too!