From your response to the already given answers I understand that this is not what you are looking for but by itself '$$' also refers to the PID of the current process.
use strict;
use warnings;
print "$$\n\n";
sleep( 100 );
If you run the above code and then run
ps -aef | grep "perl"
on another window you will see this:
UserName PID ... ... TIME Terminal TIME <Your code invocation :
+perl whatever.pl>
NOTE: This has only been tested (by me) on Unix platforms.