better and great hash
am 25.08.2007 12:20:52 von john.swilting
I would wish to store the result of the loop while in a list. I must make
how?
#!/usr/bin/perl -w
use strict;
use warnings;
my %Conf;
$Conf{XferMethod} = 'rsync';
$Conf{XferLogLevel} = 1;
$Conf{RSyncShareName} = '___1___';
$Conf{ClientNameAlias} = '___2___';
while(my($clef, $valeur) = each (%Conf)) {
print "$clef => $valeur","\n";
}
Re: better and great hash
am 25.08.2007 13:44:28 von QoS
john swilting wrote in message-id: <46d00284$0$27385$ba4acef3@news.orange.fr>
>
>
> I would wish to store the result of the loop while in a list. I must make
> how?
>
> #!/usr/bin/perl -w
>
> use strict;
> use warnings;
>
> my %Conf;
> $Conf{XferMethod} = 'rsync';
> $Conf{XferLogLevel} = 1;
> $Conf{RSyncShareName} = '___1___';
> $Conf{ClientNameAlias} = '___2___';
>
> while(my($clef, $valeur) = each (%Conf)) {
> print "$clef => $valeur","\n";
> }
Assuming you mean store to disk... use DBM::Deep
Re: better and great hash
am 25.08.2007 15:10:53 von Tad McClellan
john swilting wrote:
>
> I would wish to store the result of the loop while in a list.
perldoc -f push
> I must make
> how?
>
> #!/usr/bin/perl -w
>
> use strict;
> use warnings;
>
> my %Conf;
> $Conf{XferMethod} = 'rsync';
> $Conf{XferLogLevel} = 1;
> $Conf{RSyncShareName} = '___1___';
> $Conf{ClientNameAlias} = '___2___';
my @list;
> while(my($clef, $valeur) = each (%Conf)) {
> print "$clef => $valeur","\n";
push @list, "$clef => $valeur\n";
> }
--
Tad McClellan
email: perl -le "print scalar reverse qq/moc.noitatibaher\100cmdat/"