Created
July 14, 2019 11:51
-
-
Save tomcha/d276c649081e4ce13ad2fe956c33c454 to your computer and use it in GitHub Desktop.
ref_allow.pl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl | |
use strict; | |
use warnings; | |
use feature 'say'; | |
use DDP { deparse => 1 }; | |
my $allow = {1 => ['a', 'b', 'c'], 2 => ['d', 'e', 'f']}; | |
say $allow->{2}->[0]; #OK | |
say $allow{2}[0]; #エラー(use strictはずすと通る) | |
say $allow->{2}[0]; #OK |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment