On Jul 10, 2014, at 11:50 AM, Natxo Asenjo wrote:
> On Thu, Jul 10, 2014 at 1:00 AM, Jim Gibson wrote:
>
> On Jul 9, 2014, at 2:58 PM, Natxo Asenjo wrote:
> > On Wed, Jul 9, 2014 at 10:35 PM, Jim Gibson wrote:
> > On Jul 9, 2014, at 1:20 PM, Natxo Asenjo wrote:
>
> In order to use the hash m
On Thu, Jul 10, 2014 at 1:00 AM, Jim Gibson wrote:
>
> On Jul 9, 2014, at 2:58 PM, Natxo Asenjo wrote:
> > On Wed, Jul 9, 2014 at 10:35 PM, Jim Gibson
> wrote:
> > On Jul 9, 2014, at 1:20 PM, Natxo Asenjo wrote:
>
> In order to use the hash method of determining uniqueness, you must
> convert
On Jul 9, 2014, at 2:58 PM, Natxo Asenjo wrote:
>
>
>
> On Wed, Jul 9, 2014 at 10:35 PM, Jim Gibson wrote:
>
> On Jul 9, 2014, at 1:20 PM, Natxo Asenjo wrote:
>
> > hi,
> >
> > i have an array of arrays which contains equal elements. I would like to
On Wed, Jul 9, 2014 at 10:35 PM, Jim Gibson wrote:
>
> On Jul 9, 2014, at 1:20 PM, Natxo Asenjo wrote:
>
> > hi,
> >
> > i have an array of arrays which contains equal elements. I would like to
> isolate the unique values.
>
> Do you mean that the subarra
On Jul 9, 2014, at 1:20 PM, Natxo Asenjo wrote:
> hi,
>
> i have an array of arrays which contains equal elements. I would like to
> isolate the unique values.
Do you mean that the subarrays contain equal NUMBERS of elements?
>
> I have tried using the uniq method of List
hi,
i have an array of arrays which contains equal elements. I would like to
isolate the unique values.
I have tried using the uniq method of List::MoreUtils but it apparently
does not work with an AoA.
This is what I tried:
for my $i ( @$data_ref ) {
push $seen_ref, [ $i->{'valu
On Thu, Aug 23, 2012 at 05:19:34PM -0400, Shawn H Corey wrote:
> You're trying to do too much in one statement.
>
> for my $coord ( @coords ){
> if( $coords->[0] >= 0 ){
> print join( q{, }, @{ $coords } ), "\n";
> }
> }
Looks like you're trying to do too much too. ;) You are test
On Thu, 23 Aug 2012 14:17:26 -0700
Jim Gibson wrote:
> You could also combine print, grep, and map to accomplish the same
> thing.
Please don't. If you're having this much trouble getting it right, the
person stuck with maintaining it will also have trouble understanding
what you coded. Break it
On Thu, 23 Aug 2012 15:58:43 -0500
Chris Stinemetz wrote:
> print grep { $_->[0] >= 0 } @coords;
You're trying to do too much in one statement.
for my $coord ( @coords ){
if( $coords->[0] >= 0 ){
print join( q{, }, @{ $coords } ), "\n";
}
}
--
Just my 0.0002 million dolla
On Aug 23, 2012, at 1:58 PM, Chris Stinemetz wrote:
>>
>>
>> If @coords is just an Array of Arrays then that should be:
>>
>> print grep { $_->[0] >= 0 } @coords;
>>
>>
>> Your example thinks @coords is an Array of Arrays of Arrays.
&g
>
>
> If @coords is just an Array of Arrays then that should be:
>
> print grep { $_->[0] >= 0 } @coords;
>
>
> Your example thinks @coords is an Array of Arrays of Arrays.
>
>
> John
> --
>
print grep { $_->[0] >= 0 } @coords;
Just prints the m
On Aug 23, 2012, at 12:57 PM, Chris Stinemetz wrote:
> Hello List,
> I'm trying to grep an array of arrays, but I am getting the following error:
>
> Can't use string ("1") as an ARRAY ref while "strict refs" in use at
> form.pl line 121, <
Chris Stinemetz wrote:
Hello List,
Hello,
I'm trying to grep an array of arrays, but I am getting the following error:
Can't use string ("1") as an ARRAY ref while "strict refs" in use at
form.pl line 121,<$COORDS> line 1281.
Press any key to continue
Hello List,
I'm trying to grep an array of arrays, but I am getting the following error:
Can't use string ("1") as an ARRAY ref while "strict refs" in use at
form.pl line 121, <$COORDS> line 1281.
Press any key to continue . . .
Below is the grep stat
Hello,
I wanted to return an array of arrays from c to perl.
I build up my arrays by unisng av_push, but then ?
I cannot av_push a AV*, so should I make a newSV and filled it
by casting, or should I make a newRV with the AV* (after casting)
and push it ?
Thank
Rodrick Brown wrote:
>
> my $arrayRef = [ 1, 2, 3, ['a', 'b', 'c', ["Hello"] ]];
>
> I have no problem returning single elements but how would one walk this list
> of elements with say a for loop?
use strict;
use warnings;
my $arrayRef = [ 1, 2, 3, ['a', 'b', 'c', ["Hello"] ]];
my @flat = $arra
> "(Randal" == (Randal L Schwartz) <[EMAIL PROTECTED]> writes:
(Randal> my @items = @$arrayRef;
(Randal> while (@items) {
(Randal> if (ref $items[0]) {
(Randal> if (ref $items[0] eq "ARRAY") {
(Randal> unshift @items, @{shift @items}; # replace arrayref with
co
> "Aruna" == Aruna Goke <[EMAIL PROTECTED]> writes:
Aruna> for my $item (@$arrayRef){
Aruna> print $item unless ref($item) eq 'ARRAY';
Aruna> if(ref($item) eq 'ARRAY'){
Aruna>for my $item1(@$item){
Aruna>print $item1 unless ref($item1) eq 'ARRAY';
Aruna> {
Arun
"Rodrick Brown" schreef:
> my $arrayRef = [ 1, 2, 3, ['a', 'b', 'c', ["Hello"] ]];
>
> I have no problem returning single elements but how would one walk
> this list of elements with say a for loop?
Start writing it differently, maybe like:
my $data = [
1,
2,
3,
[ 'a',
Gunnar Hjalmarsson wrote:
Rodrick Brown wrote:
my $arrayRef = [ 1, 2, 3, ['a', 'b', 'c', ["Hello"] ]];
I have no problem returning single elements but how would one walk
this list
of elements with say a for loop?
One way:
my $level = 0;
breakdown( $arrayRef );
sub breakdown {
Rodrick Brown wrote:
my $arrayRef = [ 1, 2, 3, ['a', 'b', 'c', ["Hello"] ]];
I have no problem returning single elements but how would one walk this list
of elements with say a for loop?
One way:
my $level = 0;
breakdown( $arrayRef );
sub breakdown {
my $ref = shift;
On Fri, Jun 6, 2008 at 9:31 PM, Rodrick Brown <[EMAIL PROTECTED]> wrote:
> my $arrayRef = [ 1, 2, 3, ['a', 'b', 'c', ["Hello"] ]];
>
> I have no problem returning single elements but how would one walk this list
> of elements with say a for loop?
>
You can treat an array reference like an array by
On Sat, Jun 7, 2008 at 9:31 AM, Rodrick Brown <[EMAIL PROTECTED]> wrote:
> my $arrayRef = [ 1, 2, 3, ['a', 'b', 'c', ["Hello"] ]];
>
> I have no problem returning single elements but how would one walk this list
> of elements with say a for loop?
>
Try this code:
use strict;
my $arrayRef = [ 1,
my $arrayRef = [ 1, 2, 3, ['a', 'b', 'c', ["Hello"] ]];
I have no problem returning single elements but how would one walk this list
of elements with say a for loop?
> ""Mumia" == "Mumia W " writes:
"Mumia> On 03/13/2007 07:44 PM, Hardly Armchair wrote:
>> Hello List,
>> I have a data structure containing a bunch of strings in different groups:
>> [...]
>> I want these sorted first alphabetically within the group, and then
>> according to the number of me
On 03/13/2007 07:44 PM, Hardly Armchair wrote:
Hello List,
I have a data structure containing a bunch of strings in different groups:
[...]
I want these sorted first alphabetically within the group, and then
according to the number of member in the group.
[...]
This is slightly more compact
Hardly Armchair wrote:
> Hello List,
Hello,
> I have a data structure containing a bunch of strings in different groups:
>
> $groups = [
> [
> 'SSPDQR',
> 'SSPSDR',
> 'STSSER',
> ],
> [
> 'CSANLH',
>
Hello List,
I have a data structure containing a bunch of strings in different groups:
$groups = [
[
'SSPDQR',
'SSPSDR',
'STSSER',
],
[
'CSANLH',
'CVANRD',
],
[...],
The Other1 wrote:
> Hi John,
Hello,
> Thank you so much for the code you posted, it works great and is pretty
> elegant. If you have a second, could you explain this line to me?
>
> if ( $row->[ $column ] =~ /^[\d.+-]+$/ ) {
>
> And this one as well:
> if ( $column =~ /^[\d.+-]+$/ ) {
The Other1 wrote:
> Hi all,
Hello,
> Sorta newbie here...
>
> I have parsed log files and have an array of arrays that looks like this:
>
> [...]
> 1 0.0 0.000 31.954 36.169 12.645 20:40
> 16 1048.0 16.196 15.825 52.502 5.150 20:40
> 8 1281.7 12.059 9.634 41.264 4.
On Thu, 2006-20-04 at 20:55 -0600, The Other1 wrote:
> My question is how to walk through the array grabbing column 1 of four rows,
> pass those values to the Average function (or if there is a beter way, I am
> open to it!), store the average to be used by GD later, then do the next
> column, e
Hi all,
Sorta newbie here...
I have parsed log files and have an array of arrays that looks like this:
[...]
1 0.0 0.000 31.954 36.169 12.645 20:40
16 1048.0 16.196 15.825 52.502 5.150 20:40
8 1281.7 12.059 9.634 41.264 4.869 20:40
9 1157.7 19.094 16.889 52.218 4.742 20:40
0 0.0 0.000 76.430
Charles K. Clarkson wrote:
> Ed wrote:
>
> : push( @lineArray, @_ ); <---no it's an array of arrays.
>
> An array of arrays is a short name for an array of array
> references. Array elements can only hold scalar values and arrays
> are not scalars. Ref
Thomas Bätzler wrote:
> Ed <[EMAIL PROTECTED]> asked:
>>
>> push( @lineArray, @_ ); <---no it's an array of arrays.
>
> This will append all the items in @_ to @lineArray.
>
> You shoul've said "push( @lineArray, [EMAIL PROTECTED]
e you doing the following?
push( @lineArray, @_ ); <---no it's an array of arrays.
This is equivalent (although more efficient) to
@[EMAIL PROTECTED] .. $#_ + @lineArray] = @_;
which is equivalent to
splice (@lineArray, @lineArray, 0, @_);
As mentioned, that should be p
/ )
: {
: print "FOUND localgroup line:-> $_\n";
: split /\s/;
This form of split() is deprecated. You should be receiving
an error for this.
: push( @lineArray, @_ ); <---no it's an array of arrays.
An array of arrays is a short name
Ed <[EMAIL PROTECTED]> asked:
[...]
> I'm reading from a file and constructing an array of arrays.
> Here's an example of what's in the file:
> net localgroup Field Aidan /ADD
[...]
> I want to sort the lines in the file by the 3rd column
> (Field, In
I'm still hobbled by my thinking in C problem so I'm looking for a way
to do this.
I'm reading from a file and constructing an array of arrays.
Here's an example of what's in the file:
net localgroup Field Aidan /ADD
net localgroup Internal Aidan /ADD
net localgroup CM
Disregard my previous email as it was another error further up in the
program.
Typical beginners mistake I guess :)
Cheers
Tommy
[EMAIL PROTECTED]
http://homepage.mac.com/tgrav/
"Any intelligent fool can make things bigger,
more complex, and more violent. It takes a
touch of genius -- and a
Tommy Grav wrote:
print $refstars[1][0] ; # <- This is line 38
However this code returns an error I do not understand
Missing right curly or square bracket at refstar.pl line 38, at end
of line
syntax error at refstar.pl line 38, at EOF
Execution of refstar.pl aborted due to
The code you posted does not return any errors.
Check the parts you didn't post.
-Original Message-
From: Tommy Grav [mailto:[EMAIL PROTECTED]
Sent: Tuesday, February 28, 2006 1:48 PM
To: beginners@perl.org
Cc: Tommy Grav
Subject: Array of arrays
I have a file of numbers that I
I have a file of numbers that I want to read in and put the first 12
lines into row one of
of a two-dimensional array, the next 12 into row two and so on.
my $nref = 12 ;
my $n = 0 ;
my $im = 0 ;
my @refstars ;
my @refmag ;
while (<>) {
good evening list.
thanks for the replies and sorry that i couldn't find the time to reply
sooner. sadly i'm still in a rush and haven't tried all of your
solutions, hope i will get to it soon. for now i just go with one, so i
can get the stuff i wanted to work.
still curious about the other thro
mark berger <[EMAIL PROTECTED]> writes:
> hey list. i stuck with gererating a wordlist from a changing
> multidimensional array. each entry in the array contains a list with the
> possible values.
>
> fe:
>
> @wordlayout = ((a, b),# possible values for 1st char
>(c),
Adriano Ferreira wrote:
> On 9/29/05, mark berger <[EMAIL PROTECTED]> wrote:
>>hey list. i stuck with gererating a wordlist from a changing
>>multidimensional array. each entry in the array contains a list with the
>>possible values.
>
> I am bit rusty, because it took me a little too long to make
On 9/29/05, mark berger <[EMAIL PROTECTED]> wrote:
> hey list. i stuck with gererating a wordlist from a changing
> multidimensional array. each entry in the array contains a list with the
> possible values.
I am bit rusty, because it took me a little too long to make it work,
but here is a recurs
On Thu, Sep 29, 2005 at 07:26:51PM +0200 mark berger wrote:
> hey list. i stuck with gererating a wordlist from a changing
> multidimensional array. each entry in the array contains a list with the
> possible values.
>
> fe:
>
> @wordlayout = ((a, b),# possible values for 1st char
On Sep 29, mark berger said:
hey list. i stuck with gererating a wordlist from a changing
multidimensional array. each entry in the array contains a list with the
possible values.
You want a "cartesian cross product". And there's a module out there that
does just that: Set::CrossProduct.
AIL PROTECTED]
Sent: Thursday, September 29, 2005 1:27 PM
To: beginners@perl.org
Subject: generating a wordlist from an array of arrays
hey list. i stuck with gererating a wordlist from a changing
multidimensional array. each entry in the array contains a list with the
possible values.
fe:
hey list. i stuck with gererating a wordlist from a changing
multidimensional array. each entry in the array contains a list with the
possible values.
fe:
@wordlayout = ((a, b), # possible values for 1st char
(c), # possible values for 2nd char
(d, e
> following the example in the perldsc (data structures cookbook), i
wrote this
> piece of code to create an array of arrays from a data file :
>
>
> #!/usr/bin/perl -w
> use strict ;
>
> my @AofA ; # array of arrays of file contents
> open (fh1, " while (
On Mar 16, 2004, at 10:13 AM, Joseph Paish wrote:
following the example in the perldsc (data structures cookbook), i
wrote this
piece of code to create an array of arrays from a data file :
#!/usr/bin/perl -w
use strict ;
my @AofA ; # array of arrays of file contents
open (fh1, ") {
following the example in the perldsc (data structures cookbook), i wrote this
piece of code to create an array of arrays from a data file :
#!/usr/bin/perl -w
use strict ;
my @AofA ; # array of arrays of file contents
open (fh1, ") {
push @AofA, (split /\t/) ;
}
close (fh1) ;
Alright then,
first you want to think about how you are going to populate the arrays. For example,
if I have a file that contains the following data:
1|10
5|7
I would do this:
open(FH, "< bob.txt");
my @file_list;
while()
{
# add a reference of the 2 file columns to @file_list
On Mon, Oct 20, 2003 at 12:33:00PM +0200 Christiane Nerz wrote:
> How do I read data out of a table-file in an array-of-arrays?
>
> Problem: I have to compare two tables with pairs of start-stop-Positions.
> I want to find out, which pair of Start-Stop-Position in table_1 is
>
<[EMAIL PROTECTED]Kopie:
elabs.com> Thema: RE: array of arrays
... from two text files.
Output of a pattern-searching-program and data out of a DB (genebank).
No prob to read in those data in a textfile too.
Stephen Hardisty wrote:
How do I read data out of a table-file in an array-of-arrays?
Problem: I have to compare two tables with pairs of start-stop
> How do I read data out of a table-file in an array-of-arrays?
>
> Problem: I have to compare two tables with pairs of start-stop-Positions.
> I want to find out, which pair of Start-Stop-Position in table_1 > is
> entirely within the range marked by a pair of start-stop-p
Hi!
How do I read data out of a table-file in an array-of-arrays?
Problem: I have to compare two tables with pairs of start-stop-Positions.
I want to find out, which pair of Start-Stop-Position in table_1 is
entirely within the range marked by a pair of start-stop-positions of
the second table
Jerry Preston <[EMAIL PROTECTED]> wrote:
:
: I have the following hash:
This is not a hash. it is a partial algorithm.
It contains at least two hashes. Neither of which
seem to be a hash of an array of arrays. Can you
show us the hash you're referring to?
: for $j ( 1..20 )
ight = $DAT{ height }{ $id }{ $i }{ $j }{ 0 };
if ( $pin > 0 ) {
$pin{ order }{ $i }{ $j } = $pin;
$pin{ depth }{ $i }{ $j } = $height;
}
}
}
And you say you need translated into an array of arrays @data in this format
> my @data = ( [ '01',
Hi!,
I have the following hash:
for $j ( 1..20 ) {
for $i ( 0..$DAT{ good_setups }{ $id } ) {
$pin{ order }{ $i }{ $j } = $DAT{ pin}{ $id }{ $i }{ $j }{ 0
} if $DAT{ pin }{ $id }{ $i }{ $j }{ 0 } > 0;
$pin{ depth }{ $i }{ $j } = $DAT{ height }{ $id }{ $i }{ $j }{ 0 }
if $D
Mike Liss wrote:
>
> Sorry for the confusing post, here is a little better explanation:
>
> I am trying to create multi-dimensional arrays
>
> $MyArray[ 2 ][];
>
> So I can do this:
>
> $MyArray[ 0 ][ 0 ] = 2;
> $MyArray[ 0 ][ 1 ] = 3;
$MyArray[ 0 ] = [ 2, 3
Mike Liss wrote:
> I am trying to create multi-dimensional arrays
>
> $MyArray[ 2 ][];
>
That's meaningless in Perl, but anyway...
>
> So I can do this:
>
> $MyArray[ 0 ][ 0 ] = 2;
> $MyArray[ 0 ][ 1 ] = 3;
>
> $MyArray[ 0 ][ 0 ] = 4;
> $MyArray[ 1 ][ 1 ] = 5;
> $MyArray[ 2 ][ 2 ] = 6;
>
>
> But
> But what I really want to do is this :
>
> push( @MyArray[0], 2 );
> push( @MyArray[0], 3 );
>
> push( @MyArray[1], 4 );
> push( @MyArray[1], 5 );
> push( @MyArray[1], 6 );
I apologize. My first response was incorrect. You need:
push( @{$MyArray[0]}, 2 )
Sorry for the confusing post, here is a little better explanation:
I am trying to create multi-dimensional arrays
$MyArray[ 2 ][];
So I can do this:
$MyArray[ 0 ][ 0 ] = 2;
$MyArray[ 0 ][ 1 ] = 3;
$MyArray[ 0 ][ 0 ] = 4;
$MyArray[ 1 ][ 1 ] = 5;
> -Original Message-
> From: Angerstein [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, August 28, 2002 8:59 AM
> To: Bob Showalter
> Subject: AW: How to unshift to an array in an array of arrays?
>
>
> hmm i have a different behavior there
>
> if i do:
>
> -Original Message-
> From: Angerstein [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, August 28, 2002 6:12 AM
> To: [EMAIL PROTECTED]
> Subject: How to unshift to an array in an array of arrays?
>
>
> How to unshift to an array in an array of arrays?
$ perl -
On Wed, 28 Aug 2002, Angerstein wrote:
> Than its possible:
> my $x = 0;
> > my @arr1 = (1, 2, 3);
> > my @arr2 = (4, 5, 6);
> > my @arr3 = (7, 8, 9);
> > my @arrofarrs;
> > unshift (@arrofarrs, \@arr3);
> > unshift (@arrofarrs, \@arr2);
> > unshift (@arrofarrs, \@arr1);
> unshift (@arr1, $x);
in @arrofarrs.
right?
> -Ursprüngliche Nachricht-
> Von: Sudarshan Raghavan [mailto:[EMAIL PROTECTED]]
> Gesendet am: Mittwoch, 28. August 2002 23:23
> An: Perl beginners
> Betreff: Re: How to unshift to an array in an array of arrays?
>
> On Wed, 28 Aug 2002, Angerstein wrote:
>
On Wed, 28 Aug 2002, Angerstein wrote:
> How to unshift to an array in an array of arrays?
Something like this
my @arr1 = (1, 2, 3);
my @arr2 = (4, 5, 6);
my @arr3 = (7, 8, 9);
my @arrofarrs;
unshift (@arrofarrs, \@arr3);
unshift (@arrofarrs, \@arr2);
unshift (@arrofarrs, \@arr1);
An array
How to unshift to an array in an array of arrays?
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
28, 2002 2:55 PM
To: [EMAIL PROTECTED]
Subject: referring to an array in an array of arrays
How can I get at an array in an array of arrays?
I'm creating the arrays using:
$fComments[$i++] = [ @comments ];
Now I want to get back what I put in:
print "$fComments[0]\n"
n array in an array of arrays
How can I get at an array in an array of arrays?
I'm creating the arrays using:
$fComments[$i++] = [ @comments ];
Now I want to get back what I put in:
print "$fComments[0]\n";
but this prints ARRAY(0x107671f0). How do I follow that pointer?
Bryan R Harris wrote:
>
> How can I get at an array in an array of arrays?
>
> I'm creating the arrays using:
>
> $fComments[$i++] = [ @comments ];
>
> Now I want to get back what I put in:
>
> print "$fComments[0]\n";
print "
How can I get at an array in an array of arrays?
I'm creating the arrays using:
$fComments[$i++] = [ @comments ];
Now I want to get back what I put in:
print "$fComments[0]\n";
but this prints ARRAY(0x107671f0). How do I follow that pointer?
(I really think we need
Have you tried:
foreach (@$Z) {
print join ", ", @$_;
print "\n";
}
Although this might be more useful:
foreach (@$Z) {
foreach(@$_) {
print "$_, ";
}
print "\n";
}
Looks easy eh? :)
The DBI does have other ways of returning data, which
sometimes is more effective/easier. De
Kurt wrote:
>
> I'm working with a database interface (DBI) that returns information
> by returning a reference ($Z) to an array of arrays.
>
> ...
>
> When I write $Z->[2][3] I get the expected -81.3439.
>
> Now the questions:
>
> If I want to iter
I'm working with a database interface (DBI) that returns information
by returning a reference ($Z) to an array of arrays.
When I run the program in the debugger, and ask for $Z, I get:
0 ARRAY(0x20d5e8)
0 ARRAY(0x41acfc)
0 26412
1 'ORLANDO'
2
Will Muir wrote:
> I have an array of arrays @data that
> I would like to take the reference of the 5th element of the first 3 elements and
> put them into another array and then shorten @data by 3.
> I hope that this makes sense, I am new to this and
> don't really k
On Oct 29, Will Muir said:
>I have an array of arrays @data that I would like to take the reference
>of the 5th element of the first 3 elements and put them into another
>array and then shorten @data by 3. I hope that this makes sense, I am
>new to this and don't really know
Hi all,
I have an array of arrays @data that I would like to take the reference of the 5th
element of the first 3 elements and put them into another array and then shorten @data
by 3. I hope that this makes sense, I am new to this and don't really know a better
way too explain it. He
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED]
(Michael Fowler) wrote:
> $array[$i][$j][$k][$l][$m] eq $list[$l][$m]
> However, this is the first time I've seen someone intentionally using such a
> large-dimension array. What is this for?
i've used many more dimensions than that ;)
--
bri
On Thu, Oct 18, 2001 at 02:28:41PM -0600, Tyler Cruickshank wrote:
> $array[$i][$j][$k] = [ @list ]; where, @list is a 2-D array ie. $list[][].
>
> How do I access the individual elements of the array @list once Ive put it
> into the array @array?
$array[$i][$j][$k][$l][$m] eq $list[$l][$m]
H
Hi.
Im using a multidimensional array in the following way:
$array[$i][$j][$k] = [ @list ]; where, @list is a 2-D array ie. $list[][].
How do I access the individual elements of the array @list once Ive put it into the
array @array?
Thanks.
-ty
--
To unsubscribe, e-mail: [EMAIL PROTECT
On Sunday 23 September 2001 02:20, Zysman, Roiy wrote:
> Can any one show me a way on how to use associative arrays to hold array
> pointers,and how to modify the arrays (not the associativeones)
Well, I suppose one could give examples here, but you're going to be best
off if you read about it y
Hi all,
Can any one show me a way on how to use associative arrays to hold array
pointers,and how to modify the arrays (not the associativeones)
Thx
d like to construct a hash, whose value holds a reference to an
> array of arrays,
> however all the keys in my hash have the exact same value, which turns
> out to be the value of the last element I put it!!
>
> I felt that something is wrong in the data structure, that I should not
&
> -Original Message-
> From: Jennifer Pan [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, August 23, 2001 1:05 PM
> To: [EMAIL PROTECTED]
> Cc: Maxim Berlin
> Subject: hash of ref to array of arrays, lost all but the last element
> in hash
>
>
> Dear all,
&g
Dear all,
I would like to construct a hash, whose value holds a reference to an
array of arrays,
however all the keys in my hash have the exact same value, which turns
out to be the value of the last element I put it!!
I felt that something is wrong in the data structure, that I should not
> I know this is simpler then what I am making it but I am stumped. I used
LWP::UserAgent to fetch some data from a
> web page, What I need to do is to load the data which I believe is just
one long string that I got from calling content()
> into an array of arrays by splitting on
You're actually very close. I would just change a couple of things.
First of all, you don't need @data as well as @rows. $element is aliased to
each element in the array as it loops, so you can re-assign right back into
the same array when you split. This will cause the loop to independent of
I know this is simpler then what I am making it but I am stumped. I used
LWP::UserAgent to fetch some data from a web page, What I need to do is to load the
data which I believe is just one long string that I got from calling content() into an
array of arrays by splitting on "\n
just dereference it:
foo( @{ $R{"first"} } );
it's as easy as that =)
hth
Jos Boumans
>
> Hi all,
>
> here's my question :):
>
> I define a hash array:
> our %R=("first" => [ "one", "two" ], "second" => ["third", "fourth"]);
>
> Now I can get back back array references from this using:
Hi all,
here's my question :):
I define a hash array:
our %R=("first" => [ "one", "two" ], "second" => ["third", "fourth"]);
Now I can get back back array references from this using:
$R{"first"}
I also can get back the elements of this array:
$R{"first"}->[0]and so on..
but i would need
Here is a reply to an email on another list regarding sorting of
array of arrays. Cut and run(I did it on AS 5.6.0 build 623). From this
you should be able to do what you want.
Wags
Anyone know how to sort an array of arrays? To sort on the first column ($j
= 0), I tried:
$j = 0;
for $i (0..$#AddBook) {
@col = $AddBook[$i][$j];
@sortcol = sort @col;
print "Column $j contains: @col\n";
}
for $i (0..$#AddBook) {
print "Column $j sorted contains: @sortcol\n
97 matches
Mail list logo