How do I print a hash from within a string, as in
print "\n[*] Query : $select { query }";
versus
print "\n[*] Query : " . $select { query };
How do I print a hash from within a string, as in
print "\n[*] Query : $select { query }";
versus
print "\n[*] Query : " . $select { query };
You may need to eliminate the extra spaces:
print "\n[*] Query : $select{query}";
With a space after $select
, Perl thinks that you are done with the interpolation of that variable, and treats the following text (including the curly braces) literally.