On 2010.03.26 09:55, Pry, Jeffrey wrote:
> Actually that hash error was a mistake on my part.
>
> My question is, if I push 3 records to @settings, how do I get, let's say,
> just the second record?
my $hashref = $settings[1];
This is why using a straight hash is easier.
You can extract inform
AM
To: beginners@perl.org
Cc: Pry, Jeffrey
Subject: Re: Storing a Hash Inside An Array
Hi Jeffrey,
On Friday 26 Mar 2010 15:36:46 Pry, Jeffrey wrote:
> Hey,
>
> First off let me say that this mailing list is great! It is nice to be able
> to see the collaborative effort that everyone puts in w
Pry, Jeffrey
Subject: Re: Storing a Hash Inside An Array
Hi Jeffrey,
On Friday 26 Mar 2010 15:36:46 Pry, Jeffrey wrote:
> Hey,
>
> First off let me say that this mailing list is great! It is nice to be able
> to see the collaborative effort that everyone puts in when one of us has
On 2010.03.26 09:02, Pry, Jeffrey wrote:
> I want to use the array because I have multiple ftp servers that can be
> called from a dropdown box. Is it possible to do this with just a hash?
It is possible:
#!/usr/bin/perl
use strict;
use warnings;
my %config;
# each server info is a hash refer
Pry, Jeffrey asked:
> Now, I was wondering if it would be possible to store a hash inside of
> an array.
Sure, just use the anonymous hash constructor {}, i.e. like
$settings[$i] = { 'ftpserver' => localhost, 'password' => 'p...@$$word' };
Or add/change individual keys in the hash
$setting
Hi Jeffrey,
On Friday 26 Mar 2010 15:36:46 Pry, Jeffrey wrote:
> Hey,
>
> First off let me say that this mailing list is great! It is nice to be able
> to see the collaborative effort that everyone puts in when one of us has a
> question or issue. Thank you!
>
> Now, I was wondering if it would
@perl.org
Subject: Re: Storing a Hash Inside An Array
On 2010.03.26 08:36, Pry, Jeffrey wrote:
> Hey,
>
> First off let me say that this mailing list is great! It is nice to be able
> to see the collaborative effort that everyone puts in when one of us has a
> question or issue. Tha
On 2010.03.26 08:36, Pry, Jeffrey wrote:
> Hey,
>
> First off let me say that this mailing list is great! It is nice to be able
> to see the collaborative effort that everyone puts in when one of us has a
> question or issue. Thank you!
>
> Now, I was wondering if it would be possible to store
Hey,
First off let me say that this mailing list is great! It is nice to be able to
see the collaborative effort that everyone puts in when one of us has a
question or issue. Thank you!
Now, I was wondering if it would be possible to store a hash inside of an
array. I would like to have an arr