Ok, I think I more or less have it. The true grocking of the hash,
well, that I think will come in time with reading and experience.
Thank you all for the help and pointers!
Justin
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.per
On Sun, 26 Aug 2007 12:17:49 -0400, Mr. Shawn H. Corey wrote:
> Peter Scott wrote:
>> Don't use the term "symlink", however tempting, or you'll confuse
>> yourself and others about real symlinks. Yes, it's not an array in the
>> hash; it's a scalar containing a *reference* to an array, and there m
Peter Scott wrote:
Don't use the term "symlink", however tempting, or you'll confuse
yourself and others about real symlinks. Yes, it's not an array in the
hash; it's a scalar containing a *reference* to an array, and there may or
may not be other references to that array elsewhere in the progra
On Sun, 26 Aug 2007 01:00:31 +, Justin The Cynical wrote:
> On Aug 24, 9:11 am, [EMAIL PROTECTED] (Randal L. Schwartz) wrote:
>> That's because (a) an arrayref is still a single value, so we haven't really
>> lied, so much as just simplified to what can be handled in the first 30 hours
>> with
On Aug 24, 9:11 am, [EMAIL PROTECTED] (Randal L. Schwartz) wrote:
> > "Justin" == Justin The Cynical <[EMAIL PROTECTED]> writes:
>
> Justin> The Llama presents hashes as single value to a key, so I never thought
> Justin> to make a hash of arrays.
>
> That's because (a) an arrayref is still a s
> "Justin" == Justin The Cynical <[EMAIL PROTECTED]> writes:
Justin> The Llama presents hashes as single value to a key, so I never thought
Justin> to make a hash of arrays.
That's because (a) an arrayref is still a single value, so we haven't really
lied, so much as just simplified to what c
2007/8/24, Justin The Cynical <[EMAIL PROTECTED]>:
> On Aug 23, 2:00 am, [EMAIL PROTECTED] (Lists User) wrote:
>
> *snip*
>
> > my %grouplist;
> > open HD,'groups.txt' or die $!;
> >
> > while() {
> > chomp;
> > my @tmp = split;
> > my $groupname = shift @tmp;
> > $grouplist{$groupn
On Aug 23, 3:42 am, [EMAIL PROTECTED] (Paul Lalli) wrote:
> On Aug 23, 2:00 am, [EMAIL PROTECTED] (Justin The Cynical) wrote:
*snip*
> > Can't use string ("prod01") as an ARRAY ref while "strict refs" in use
>
> perldoc -q "variable name"
Ah, OK, thanks. I've got a bit of reading to do. :-)
>
On Aug 23, 2:00 am, [EMAIL PROTECTED] (Lists User) wrote:
*snip*
> my %grouplist;
> open HD,'groups.txt' or die $!;
>
> while() {
> chomp;
> my @tmp = split;
> my $groupname = shift @tmp;
> $grouplist{$groupname} = [EMAIL PROTECTED];}
>
> close HD;
OK, thanks!
The Llama presents
On Aug 23, 2:00 am, [EMAIL PROTECTED] (Justin The Cynical) wrote:
> Add the name of the array to a 'master array' list of the machine
> groups
> Then create another array, which would be referenced by the group
> name, and contains the machines associated with the group.
> The script runs if I do
Hi,
Rather than a dynamic array,you just need to use a correct datastru,a hash.
It's maybe better to write codes as below.
[tmp]$ cat groups.txt
prod01 456 345 234
prod02 789 517 325
prod03 789 517 325
prod04 789 517 325
prod05 789 517 325
[tmp]$ cat test.pl
#!/usr/bin/perl
use strict;
use warni
Greets.
I have a 'config file' that contains a group name (alphanumeric) and
machine name/numbers separated by whitespace. Each group is on it's
own line. The file looks like this:
prod01 456 345 234
prod02 789 517 325
...etc, etc, etc...
What I am attempting to do is:
Put the file contents in
12 matches
Mail list logo