Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

what is "$$" for in Perl?

 
Allen Chan
Ranch Hand
Posts: 64
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
I know this is not the place, but what is "$$" for in perl, a line reads $str = "this" ."$$ADS{'name'}";
Thanks.
 
Maulin Vasavada
Ranch Hand
Posts: 1873
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi Allan,
$varname is a value of variable with 'varname' right?
so $$varname is kind of pointer to a pointer thing in C you know..
first it will get value for $varname then it will apply another $ on that value which would mean value of a variable with name "value of varname"..
here is simple program i ran,

the output was,
maulin

regards
maulin.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic