$c1 needs to be declared. you could just put my $c1; before your for loop, or do for (my $c1 = 0; ... ){. But you can also rewrite that loop to make it more "perlish" (enter TMTOWTDI -- all of these do the same thing):
foreach my $c1 ( 0.. $#data ){
print $data[$c1]{value} . "\n";
}
foreach ( 0.. $#data ){
print $data[$_]{value} . "\n";
}
print $data[$_]{value} . "\n" for 0 .. $#data;
print $_{value} . "\n" for @data;
print map { $_{value} . "\n" } @data;
|