I have a script for archiving email messages on IMAP (whole code
is available at
http://mcepl.fedorapeople.org/tmp/archiveIMAP.pl). I go through
all messages in one source folder and put all of those which
I want to archive to hash indexed by the target folder:
...
$targetFolder =
On Fri, 2008-10-03 at 16:03 +0200, Matej Cepl wrote:
I have a script for archiving email messages on IMAP (whole code
is available at
http://mcepl.fedorapeople.org/tmp/archiveIMAP.pl). I go through
all messages in one source folder and put all of those which
I want to archive to hash
On Oct 3, 10:03 am, [EMAIL PROTECTED] (Matej Cepl) wrote:
I have a script for archiving email messages on IMAP (whole code
is available athttp://mcepl.fedorapeople.org/tmp/archiveIMAP.pl). I go through
all messages in one source folder and put all of those which
I want to archive to hash
On 2008-10-03, 16:57 GMT, Paul Lalli wrote:
%targetedMessages is a hash
$targetedMessages{$tFolder} is an element of that hash, that happens
to be a reference to an array.
Of course, silly me, thanks!
Matěj
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail:
I have a problem with extracting an individual hash from an array of
hashes. I can't work out, or find elsewhere, the syntax for this.
Code as follows:
devices_array_oH is set up as array of hashes
I want to loop over all hashes in the array and to print the key value pairs for
each
On Aug 7, 7:59 am, [EMAIL PROTECTED] (Charles J Gillan) wrote:
I have a problem with extracting an individual hash from an array of
hashes. I can't work out, or find elsewhere, the syntax for this.
The syntax is found in
perldoc perlref
perldoc perlreftut
perldoc perllol
and
perldoc perldsc
Paul Lalli wrote:
I would have written the program like this:
my $itemp = 1;
foreach my $device_hash_ref (@devices_array_oH) {
print Details of device $itemp: ;
print \n\n;
foreach my $key (keys %{$device_hash_ref})
{
print ( $key \t $device_hash{$key} \n);
On Aug 7, 8:29 am, [EMAIL PROTECTED] (Mr. Shawn H. Corey) wrote:
Paul Lalli wrote:
foreach my $key (keys %{$device_hash_ref})
{
print ( $key \t $device_hash{$key} \n);
print ( $key \t $device_hash_ref-{$key} \n);
Whoops! Quite correct. Thanks for catching
On May 28, 7:41 am, [EMAIL PROTECTED] (Jeevs) wrote:
On May 28, 11:35 am, [EMAIL PROTECTED] (Jeevs) wrote:
@hashi = @hash{qw (jeevan, sarika)};
print @hashi;
this gives me the values of keys jeevan and sarika.. how does this
work ...
It works because that's the syntax for a hash
why is it that when i write
my %hash = (jeevan='ingale', sarika='bere' );
my @arr = @hash{jeevan, sarika};
print @arr;
prints ingale bere
can someone explain me how an @sign is used and what exactly goes in
the secongline of thecode.
contrary when i try something like replacing the @ sign
Hi,
@days{'Jan','Feb'} Hash slice containing ($days{'Jan'},$days{'Feb'})
-extracted from programmin perl 3rd edition
-srini
jeevs wrote:
why is it that when i write
my %hash = (jeevan='ingale', sarika='bere' );
my @arr = @hash{jeevan, sarika};
print @arr;
prints ingale bere
can
@hashi = @hash{qw (jeevan, sarika)};
print @hashi;
this gives me the values of keys jeevan and sarika.. how does this
work ...
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/
jeevs wrote:
why is it that when i write
my %hash = (jeevan='ingale', sarika='bere' );
my @arr = @hash{jeevan, sarika};
print @arr;
prints ingale bere
can someone explain me how an @sign is used and what exactly goes in
the secongline of thecode.
contrary when i try something like
On May 28, 11:35 am, [EMAIL PROTECTED] (Jeevs) wrote:
@hashi = @hash{qw (jeevan, sarika)};
print @hashi;
this gives me the values of keys jeevan and sarika.. how does this
work ...
ok i got it ...
and
I think i was not clear in my query...
I was expecting an hash slice to be
%hash{qw(jeevan
Hi,
I am the maintenance programmer for this large chunk of code. My
question is particular to this syntax:
$THE_COMMANDS{$THE_COMMAND}-($THE_COMMAND);
Where THE_COMMANDS is a hash
%THE_COMMANDS( open = dosomething );
Thus, $THE_COMMANDS{$THE_COMMAND} is nothing but dosomething right?
so why
Hello,
Are you sure that
%THE_COMMANDS( open = dosomething );
is not
%THE_COMMANDS( open = \dosomething );
The \ in front of the makes $THE_COMMAND{open} a code reference. And
the way you dereference a code ref is with the - operator. It's the
same as if I did.
my $open =
16 matches
Mail list logo