Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- use strict;
- use warnings;
- $|=1;
- my $canais = {
- canal_1 => {
- slot => 1,
- nome => "Canal 1",
- eqp => "ed871p09j4",
- ativo => 1,
- nerros => 0,
- ntotal => 0,
- ulterro => "",
- },
- canal_2 => {
- slot => 2,
- nome => "Canal 2",
- eqp => "ed871p09j4",
- ativo => 1,
- nerros => 0,
- ntotal => 0,
- ulterro => "",
- },
- canal_3 => {
- slot => 1,
- nome => "Canal 3",
- eqp => "ed871p09j5",
- ativo => 1,
- nerros => 0,
- ntotal => 0,
- ulterro => "",
- },
- canal_4 => {
- slot => 3,
- nome => "Canal 4",
- eqp => "ed871p09j2",
- ativo => 1,
- nerros => 0,
- ntotal => 0,
- ulterro => "",
- },
- };
- $canais->{canal_5} = {
- slot => 0,
- nome => "Canal 5",
- eqp => "ed871p09j6",
- ativo => 0,
- nerros => 3,
- ntotal => 7,
- ulterro => "2013-03-12 20:34:12"
- };
- for my $chave (sort keys $canais) {
- my $canal = $canais->{$chave};
- print "\n>>>> $chave\n";
- for my $coluna (keys $canal) {
- print "$coluna = $canal->{$coluna}\n";
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement