Skip to content

Instantly share code, notes, and snippets.

@ytnobody
Created July 15, 2015 01:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ytnobody/2e7c58837b97204241f2 to your computer and use it in GitHub Desktop.
Save ytnobody/2e7c58837b97204241f2 to your computer and use it in GitHub Desktop.
package Oreore;
use Data::Dumper;
sub oredayo {
my $args = [@_];
{
local @{caller.'::_'} = (qw/hoge piyo/);
print Dumper($args); ### => ['foo', 'bar']
print Dumper([@_]); ### => ['hoge', 'piyo']
};
print Dumper([@_]); ### => ['foo', 'bar']
}
package main;
Oreore::oredayo('foo', 'bar');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment