[ create a new paste ] login | about

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

sironekotoro - Perl, pasted on Sep 25:
use strict;
use warnings;
use Data::Dumper;

my %sironekotoro = (
    name    =>   'sironekotoro',
    favolite_foods    =>    ['beef' , 'pork'],
);

my %softy = (
    name    =>   'softy',
    favolite_foods    =>    ['karikari' , 'kankan', 'beef'],
);

my @human = (\%sironekotoro , \%softy);

# print Dumper @human;

for my $human(@human){
    print "name : $human->{name}\n";
    for my $foods(@{$human->{favolite_foods}}){
        print "I LOVE $foods \n";
    }
    print "---\n";
}


Output:
1
2
3
4
5
6
7
8
9
name : sironekotoro
I LOVE beef 
I LOVE pork 
---
name : softy
I LOVE karikari 
I LOVE kankan 
I LOVE beef 
---


Create a new paste based on this one


Comments: