On Thu, Jul 10, 2014 at 1:00 AM, Jim Gibson jimsgib...@gmail.com wrote:
On Jul 9, 2014, at 2:58 PM, Natxo Asenjo wrote:
On Wed, Jul 9, 2014 at 10:35 PM, Jim Gibson jimsgib...@gmail.com
wrote:
On Jul 9, 2014, at 1:20 PM, Natxo Asenjo wrote:
In order to use the hash method of determining
On Jul 10, 2014, at 11:50 AM, Natxo Asenjo wrote:
On Thu, Jul 10, 2014 at 1:00 AM, Jim Gibson jimsgib...@gmail.com wrote:
On Jul 9, 2014, at 2:58 PM, Natxo Asenjo wrote:
On Wed, Jul 9, 2014 at 10:35 PM, Jim Gibson jimsgib...@gmail.com wrote:
On Jul 9, 2014, at 1:20 PM, Natxo Asenjo
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-{'value1'}, $i
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::MoreUtils
On Wed, Jul 9, 2014 at 10:35 PM, Jim Gibson jimsgib...@gmail.com 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 subarrays contain equal NUMBERS
On Jul 9, 2014, at 2:58 PM, Natxo Asenjo wrote:
On Wed, Jul 9, 2014 at 10:35 PM, Jim Gibson jimsgib...@gmail.com 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
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 testing
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 statement:
print grep { $_-[0][0] = 0 } @coords;
Any
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 . . .
Below is the grep statement:
print
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, $COORDS line 1281.
Press any key to continue . . .
Below
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 memory adress:
ARRAY(0x29d459c)ARRAY(0x29d462c)ARRAY(0x29d46cc
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.
John
--
print grep { $_-[0] = 0 } @coords;
Just prints
On Thu, 23 Aug 2012 15:58:43 -0500
Chris Stinemetz chrisstinem...@gmail.com 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
On Thu, 23 Aug 2012 14:17:26 -0700
Jim Gibson jimsgib...@gmail.com 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
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 = $arrayRef;
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',
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'){
Arunafor my $item1(@$item){
Arunaprint $item1 unless ref($item1) eq 'ARRAY';
Aruna {
Aruna
(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
contents
(Randal
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 {
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?
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, 2, 3,
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
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;
Mumia == Mumia W mumia.w.18.spam 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 member
Hello List,
I have a data structure containing a bunch of strings in different groups:
$groups = [
[
'SSPDQR',
'SSPSDR',
'STSSER',
],
[
'CSANLH',
'CVANRD',
],
[...],
Hardly Armchair wrote:
Hello List,
Hello,
I have a data structure containing a bunch of strings in different groups:
$groups = [
[
'SSPDQR',
'SSPSDR',
'STSSER',
],
[
'CSANLH',
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
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.+-]+$/ ) {
Because
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
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, etc,
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.869 20:40
9 1157.7 19.094 16.889
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, Internal, CM, DocAdmin)
If you're not particularly
/ )
: {
: 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 for an array of array
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 push (@lineArray, [EMAIL
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] ); instead.
No he shouldn't have. @_ is a global variable so
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. References to arrays are scalars
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 Aidan /ADD
net localgroup
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 () {
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 want
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
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
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
On Tuesday 04 October 2005 07:48, Jabir Ahmed wrote:
[..]
my @details=split('\t',$line);
[EMAIL PROTECTED];
$reccnt+=1;
[..]
How do i read the values of @details trought the
$record array;
i want something like this
print $record[1][1] == this would refer to the
Jabir Ahmed am Dienstag, 4. Oktober 2005 07.48:
...
use strict; # forces declaration of variables
use warnings; # big help :-)
...
$file=$ARGV[0] || die File not found $!;
my %uni=();
# %uni never used below
my @record;
open (FH,sort $file|);
$file=$ARGV[0] || die File not found $!;
my %uni=();
open (FH,sort $file|);
$reccnt=0;
while (FH)
{
$line=$_;
my @details=split('\t',$line);
[EMAIL PROTECTED];
$reccnt+=1;
}
$file=$ARGV[0] || die File not found $!;
my %uni=();
open (FH,sort $file|);
$reccnt=0;
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),
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,
: 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:
@wordlayout = ((a, b
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.
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
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, /path/to/filename/filename.txt) or die (no can do) ;
while (fh1
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, /path
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, /path/to/filename/filename.txt) or die (no can do
Hello everyone,
I have:
@one = qw(A B C D);
@two = qw(E F G H);
I want to build a multidimensional array from the above arrays. I want
to put @one in the first column of the array. I want to put @two in
the second column of the array.
I want the resulting MDA to look like:
@mda = (
On Jan 29, Kevin Old said:
@one = qw(A B C D);
@two = qw(E F G H);
@mda = (
[A][E],
Do you mean [A, E]?
[B][F],
[C][G],
[D][H]
);
If so, this is how I'd do it:
@mda = map [ $one[$_], $two[$_] ], 0 .. $#one;
If you need an explanation, feel free to ask.
On Jan 29, Kevin Old said:
On Thu, 2004-01-29 at 12:34, Jeff 'japhy' Pinyan wrote:
On Jan 29, Kevin Old said:
@one = qw(A B C D);
@two = qw(E F G H);
Well, no that wasn't what I was looking for, but it's a nice piece of
code to add to my arsenal. That basically puts the contents of @one in
On Thu, 2004-01-29 at 12:34, Jeff 'japhy' Pinyan wrote:
On Jan 29, Kevin Old said:
@one = qw(A B C D);
@two = qw(E F G H);
@mda = (
[A][E],
Do you mean [A, E]?
[B][F],
[C][G],
[D][H]
);
If so, this is how I'd do it:
@mda = map [
Kevin Old wrote:
I have:
@one = qw(A B C D);
@two = qw(E F G H);
I want to build a multidimensional array from the above arrays. I want
to put @one in the first column of the array. I want to put @two in
the second column of the array.
I want the resulting MDA to look like:
@mda = (
On Thu, 2004-01-29 at 14:17, Rob Dixon wrote:
but /please/ go back a few steps and explain what you want you're
trying to do. I doubt that putting characters 'A' .. 'H' into
an array is your goal. What you're starting with and what end you
have in mind is fundamental. Abstract as little as you
'),
('#', 'View the Job Log', 'Job Log'),
('#', 'View the Client Assets', 'Client Assets'),
('#', 'View Press Releases', 'Press Releases')
],
); # data simplified and other keys removed...
I want to be able to first get the array of arrays that matches a key,
keeping
references like you did in the outer structure. So you end up with:
%hash = ( 'key1' = [ [ '#1', 'View1', 'Title1',
'#2', 'View2', 'Title2' ],
I want to be able to first get the array of arrays that matches a key,
keeping it as an array of arrays., then do
reference with 3 elements. Use [] instead of () to
derive an array reference.
I want to be able to first get the array of arrays that matches a key,
keeping it as an array of arrays., then do a for each loop, keeping
access to the array of that array item (OK, bad description, I know...):
(here's
Disregard this first message my web based mail client was acting up, the
other message is much more informative, sorry,
http://danconia.org
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
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
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
... 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
:
elabs.com Thema: RE: array of arrays
20.10.2003 12:37
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
entirely within
-prepare('SOME SQL HERE');
$sth-execute; # run the sql
my @db_list;
while($sth-fetchrow_arrayref)
{
# assuming you only select 2 rows in your sql
push(@db_list, $_);
}
So now we have 2 arrays of array references we need to compare them. Ofcourse, it
would be much more
};
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', '02', '03', '04', '05', '06', '07', '08',
'09', '10', '11', '12
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 ) {
: for $i
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
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;
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 );
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 what I really
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 ];
Or:
How to unshift to an array in an array of arrays?
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
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
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:
How to unshift to an array in an array of arrays?
Something
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);
and it will
-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 -d -e 1
DB1 @aoa = ([qw(foo
-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:
unshift (@{myarray[1]}, $time
Hi,
I have a simple question: how do I access an array in an array?
@array = (@array1, array2); ### unless this is wrong...
the idea behind it is, that I have a long list, and want to put all
25 entries in a seperate array in that big array. later on I want to
be able to read one
: Friday, July 05, 2002 8:32 AM
To: [EMAIL PROTECTED]
Subject: array of arrays
Hi,
I have a simple question: how do I access an array in an array?
@array = (@array1, array2); ### unless this is wrong...
the idea behind it is, that I have a long list, and want to put all
25
Hi,
I've read http://webmaster.indiana.edu/perl56/pod/perllol.html and
this cleared some points. :)
still I do have some problems... the assignment of values to arrays
in arrays works, but I gave the arrays in the array names:
@array = \(@names, @school, @othercrap);
so $array[2][3
On Friday, July 5, 2002, at 08:31 , Connie Chan wrote:
[..]
If you want to know what 'fields' inside %Data :
@DataKeys = keys(%Data);
print @DataKeys; # So you get Code, Birth, Name...
# However, the elements order in @DataKeys is not base
#on how's the order you create your key field in
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 a pre-beginners list
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 @{$fComments[0]}\n;
John
--
use Perl;
program
fulfillment
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?
(I really think we need a pre
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;
but this prints ARRAY(0x107671f0
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 know a better way too explain
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. Here
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 a better way too
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
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]
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 ;)
--
brian d
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
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
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
keep re-using @match or @splice
1 - 100 of 106 matches
Mail list logo