You may need to remove the extra spaces:
print "\n[*] Query : $select{query}";
With a space after $select Perl thinks what you did with the interpolation of this variable and literally interpret the following text (including curly braces).
Greg hewgill
source share