Hello Friends, I am wondering there is any similar concept for Ruby to
store a data’s reference like Perl, or something like the pointer in
C/C++?
In Perl:
%coins = ( “Quarter” , 25,
“Dime” , 10,
“Nickel”, 5 );
my $coin_ref = %coins; ## the reference to a hash
or I can simply do it:
$coins = { “Quarter” , 25,
“Dime” , 10,
“Nickel”, 5 };
I would appreciate if you can show me some examples.