Thanks for your advice Jim.
Although it makes very good sense to me, I am having a little
difficult implementing it. I will have to admit referencing is still a
bit foreign to me.
I am getting the following error and I am not sure how to fix it.
Type of arg 1 to push must be array (not
On 1/12/12 Thu Jan 12, 2012 1:07 PM, Chris Stinemetz
chrisstinem...@gmail.com scribbled:
Thanks for your advice Jim.
Although it makes very good sense to me, I am having a little
difficult implementing it. I will have to admit referencing is still a
bit foreign to me.
I am getting the
Thank you Jim. That got me over that hurdel!
Any advice on how to maintain the order of elements in the @header
array and print the value to the right of the = sign for each
dataset, and if there is a value in the dataset that doesn't match the
element in the @header simply leave the value blank?
On 1/12/12 Thu Jan 12, 2012 2:03 PM, Chris Stinemetz
chrisstinem...@gmail.com scribbled:
Any advice on how to maintain the order of elements in the @header
array and print the value to the right of the = sign for each
dataset, and if there is a value in the dataset that doesn't match the
Define an array with the headers you expect:
my @headers = ( 'csno', 'rfpi', 'vrp0', ... );
Use that array for your keys instead of the @header array.
To avoid warnings of uninitialized values for missing values, print the
expression (defined $data{$key} ? $data{$key} : '' ) instead of
At 11:01 PM -0600 1/12/12, Chris Stinemetz wrote:
Define an array with the headers you expect:
my @headers = ( 'csno', 'rfpi', 'vrp0', ... );
Use that array for your keys instead of the @header array.
To avoid warnings of uninitialized values for missing values, print the
expression
Chris Stinemetz wrote in message
news:ca+hbpzhw7scz2dnabxd0j1bqfcj3vpo7xm_dvrbqmpwrnul...@mail.gmail.com...
I have a script where I have captured the value on the left side of
the = as the header for my table. Now I want to take the value on
the right side of the = sign and populate a new
At 4:13 AM -0600 1/11/12, Chris Stinemetz wrote:
I have a script where I have captured the value on the left side of
the = as the header for my table. Now I want to take the value on
the right side of the = sign and populate a new row in table format
where the header value I stored in the
Just from the subject, for comparing arrays, I have been using
Array::Diff which works always fine for me.
I have a script where I have captured the value on the left side of
the = as the header for my table. Now I want to take the value on
the right side of the = sign and populate a new row
Hi guys (and gals!),
I want to compare a constant, known (expected values) array with the
results I'm collecting in another array.
Something like this, but I don't think this works the way I want it to:
my @rray1 = qw( One Two Three );
chomp( my @rray2 = STDIN );
print The 2 arrays
On Mon, 10 Feb 2003 13:55:46 -0800 (PST), Jeff Westman [EMAIL PROTECTED] wrote:
If I read 2 files into separate arrays, I *should* be able to compare the
arrays, and therefore see if the files are the same or not. SO why doesn't
this work?
if (@Af1 eq @Af2) { print Files compare okay\n; }
else { print Files differ\n; }
#
How about something clunky like this:
if (join(,@Af1) eq join(,@Af2)) { print Files compare okay\n; }
else { print Files differ\n; }
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional
Jeff Westman wrote:
If I read 2 files into separate arrays, I *should* be able to compare
the arrays, and therefore see if the files are the same or not. SO
why doesn't this work?
#--- begin code
#!/usr/local/bin/perl -w
$f1 = eghpoli1;
$f2 = eghpoli2;
open(F1, $f1) or die cannot
Hello
Thanks for your help
--
___
Diego Mauricio Riano Pachon
Biologist
Institute of Biology and Biochemistry
Potsdam University
Karl-Liebknecht-Str. 24-25
Haus 20
14476 Golm
Germany
Tel:0331/977-2809
http://bioinf.ibun.unal.edu.co/~gotem
perldoc -f grep
Essentially you would need to open each file, read each line and grab the name somehow
(regex, split, etc.). Then store the name to an array for the file (consider hash of
arrays with key being the filename and the value the array of names for that file).
Then store the name to
!
#
-Original Message-
From: Bob Showalter
To: 'Merritt Krakowitzer'; Beginners
Sent: 7/23/02 5:49 AM
Subject: RE: Comparing Arrays
-Original Message-
From: Merritt Krakowitzer [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 23, 2002 3:48 AM
-Original Message-
From: Merritt Krakowitzer [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, July 24, 2002 4:19 AM
To: Bob Showalter; 'Timothy Johnson'; 'Beginners '
Subject: RE: Comparing Arrays
I just found out I can shorten my one-liner to:
@foo==@bar @{{map {$_, $_} @foo
[EMAIL PROTECTED] wrote:
Hi
I would like to know how to compare 2 arrays.
I have 2 arrays and I would like to compare the contents of the data.
It doesn't matter in which order the data is stored so long as its the same.
So comparing the bellow should read true, but if they didn't match
Merritt Krakowitzer wrote:
Hi
Hello,
I would like to know how to compare 2 arrays.
perldoc -q array
Found in /usr/lib/perl5/5.6.0/pod/perlfaq4.pod
[snip]
How do I compute the difference of two arrays?
How do I compute the intersection of two arrays?
[snip]
How do I
-Original Message-
From: Merritt Krakowitzer [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 23, 2002 3:48 AM
To: Beginners
Subject: Comparing Arrays
Hi
I would like to know how to compare 2 arrays.
I have 2 arrays and I would like to compare the contents of the data.
It
#element of the second array
}
return 1;
#if we make it this far, they're equal
}
#
-Original Message-
From: Bob Showalter
To: 'Merritt Krakowitzer'; Beginners
Sent: 7/23/02 5:49 AM
Subject: RE: Comparing Arrays
-Original Message-
From
LOL yup. I knew someone would catch that. As Marvin would say, Back to the
old drawing board.
-Original Message-
From: Jeff 'japhy' Pinyan
To: Timothy Johnson
Cc: 'Bob Showalter '; ''Merritt Krakowitzer' '; 'Beginners '
Sent: 7/23/02 8:48 AM
Subject: RE: Comparing Arrays
On Jul 23
-Original Message-
From: Timothy Johnson [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 23, 2002 11:41 AM
To: 'Bob Showalter '; ''Merritt Krakowitzer' '; 'Beginners '
Subject: RE: Comparing Arrays
In the quick and dirty category, you can do something like this:
(I'm trying
At 15:21 19.07.2001 +0200, Diego RiaƱo wrote:
Hi everybody
I have two array, like this
@array1=(one, two, three);
@array2=(one,tww,three);
Is there some way to compare the two arrays?
I was trying with the eq and ne operations inside an IF statement but i
does not work
Could someone help me.
That's an excellent question, i said to myself; i'll bet there's a module for that!
So, i looked on cpan, and it looks like Array::Compare will do the trick.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
On Jul 19, Mooney Christophe-CMOONEY1 said:
That's an excellent question, i said to myself; i'll bet there's a
module for that!
So, i looked on cpan, and it looks like Array::Compare will do the
trick.
All the same, this is a question that stumps a lot of people. There are
two ways to
26 matches
Mail list logo