better and great hash

J

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";
}
 
Q

QoS

john swilting said:
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
 
T

Tad McClellan

john swilting said:
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";
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top