[ create a new paste ] login | about

Link: http://codepad.org/Iy3NWo7h    [ raw code | output | fork ]

sironekotoro - Perl, pasted on Sep 24:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
use strict;
use warnings;
use Data::Dumper;

my %myinfo = (
    name    =>  'sironekotoro',
    sex     =>  "male",
    food    =>  'beef'
);

my @keys = keys %myinfo;
for my $foo(@keys){
    print "$foo : $myinfo{$foo}\n";
}

print "---\n";

delete $myinfo{sex};
for my $foo(@keys){
    print "$foo : $myinfo{$foo}\n";
}


Output:
1
2
3
4
5
6
7
8
food : beef
name : sironekotoro
sex : male
---
food : beef
name : sironekotoro
Use of uninitialized value in concatenation (.) or string at t.pl line 20.
sex : 


Create a new paste based on this one


Comments: