Skip to content

Instantly share code, notes, and snippets.

@kentfredric
Created May 3, 2011 05:29
Show Gist options
  • Select an option

  • Save kentfredric/952859 to your computer and use it in GitHub Desktop.

Select an option

Save kentfredric/952859 to your computer and use it in GitHub Desktop.
#!/usr/bin/perl
use strict;
use warnings;
{
package Foo;
use Data::Dump qw( dump );
use Symbol;
sub run {
my $s = Symbol::gensym;
${*$s}{pea} = 'nut';
dump $s;
return;
}
}
Foo::run;
do {
require Symbol;
my $a = Symbol::gensym();
*{$a} = { pea => "nut" };
$a;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment