What does "$$q" mean in Perl?
perl
Solution
In your case `$q` is an scalar reference. So `$$q` gives you a scalar pointed by reference `$q`. Simple example:
$a = \"world"; #Put reference to scalar with string "world" into $a
print $$a."\n"; #Print scalar pointed by $a
Problem
I was studying Perl, and I came across the code piece below: ``` print $$q, "\n" ``` There is a `$q` variable that we don’t know exactly what it is. However, we know that when we run this code, it prints `"world"`. So, what can `$q` be? What does `$$q` mean?