Skip to content

Instantly share code, notes, and snippets.

@sakadonohito
sakadonohito / sampleRef2.pl
Created October 9, 2012 04:32
Reference and DeReference
#!/usr/bin/perl
# -*- coding:utf-8 -*-
use strict;
use warnings;
use feature 'say';
use encoding 'utf-8';
my @array = (1,2,3);
my %hash = (
@sakadonohito
sakadonohito / sampleScope.pl
Created October 9, 2012 00:48
perl scope test
#!/usr/bin/perl
# -*- coding:utf-8 -*-
#use strict;
#strictつけてるとエラーが出てしまうのでコメントアウト
use warnings;
use feature 'say';
my $file_scope = 'File Scope';
@sakadonohito
sakadonohito / sample_arg_ref.pl
Created October 8, 2012 01:21
Arguments and Reference
#!/usr/bin/perl
# -*- coding:utf-8 -*-
use strict;
use warnings;
use feature 'say';
use encoding 'utf-8';
sub responseScalar {
my $a = shift;