Re: Is there function to separate print associative array

2009-03-02 Thread diyoPatino
On Mar 1, 2:32 pm, telemac...@arpinum.org (Telemachus) wrote: > On Sun Mar 01 2009 @  1:04, Octavian Râsnita wrote: > > > > > From: "prasath_linux" > >> Hi, > > >> Is there any possible function to print the associative array.  We > >>

Re: Is there function to separate print associative array

2009-03-01 Thread Telemachus
On Sun Mar 01 2009 @ 1:04, Octavian Râsnita wrote: > From: "prasath_linux" >> Hi, >> >> Is there any possible function to print the associative array. We >> have print_r() function in PHP to display the associative array. >> Likwise is there any

Re: Is there function to separate print associative array

2009-03-01 Thread Octavian Râsnita
From: "prasath_linux" Hi, Is there any possible function to print the associative array. We have print_r() function in PHP to display the associative array. Likwise is there any function in perl to print associative array. Thanks in advance. You can use: use Data::Dump qw(pp);

Is there function to separate print associative array

2009-03-01 Thread prasath_linux
Hi, Is there any possible function to print the associative array. We have print_r() function in PHP to display the associative array. Likwise is there any function in perl to print associative array. Thanks in advance. -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For

Re: Reg. Associative array in perl

2004-12-01 Thread Randal L. Schwartz
> "Owen" == Owen Cook <[EMAIL PROTECTED]> writes: Owen> Well that's the way hashes work. If you have a recent version of Perl, at Owen> least the order will be the same different order each time you run the Owen> program. Actually, that's exactly backwards. :) On recent versions of Perl, the

Re: Reg. Associative array in perl

2004-12-01 Thread Owen Cook
On Wed, 1 Dec 2004, Owen Cook wrote: I meant to say > Well that's the way hashes work. If you have a recent version of Perl, at least the order will be the same different order each time you run the program. Owen -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail:

Re: Reg. Associative array in perl

2004-12-01 Thread Owen Cook
On 1 Dec 2004, Prabahar Mosas wrote: Please check the below coding because I actually expect one output but this code print unpredictable output. I expect the following output. Apache Windows Dos Linux Unix Solaris But Machine giving output is below

Reg. Associative array in perl

2004-11-30 Thread Prabahar Mosas
Dear All, Please check the below coding because I actually expect one output but this code print unpredictable output. I expect the following output. Apache Windows Dos Linux Unix Solaris But Machine giving output is below *** Linux Apache Win

RE: associative array not looking like I thought it would

2002-04-26 Thread David Gray
> This was all written by a vendor and I am trying to learn > PERL to modify what they did. When you say I must print it > explicitly, what exactly do you mean? You have to _sort_ it explicitly. In Timothy's example, he was sorting the hash alphabetically based on the keys. The keys function r

Re: associative array not looking like I thought it would

2002-04-26 Thread P. S. Starkey
They are stored differently. >If you want them to be printed in a certain order, then you must do it >explicitly. I think it is really better to think of it as a hash instead of >an associative array for that reason. Not all of the rules apply. I >commonly use a snippet of code like this

RE: associative array not looking like I thought it would

2002-04-25 Thread Timothy Johnson
That's not the way associative arrays work. They are stored differently. If you want them to be printed in a certain order, then you must do it explicitly. I think it is really better to think of it as a hash instead of an associative array for that reason. Not all of the rules appl

associative array not looking like I thought it would

2002-04-25 Thread P. S. Starkey
I have some perl script (shown below) and I am wondering why the associative array being built ends up looking like the printout of the array as shown after the code. I would have assumed the array entries would have been shown in the same order they are put into the array but that is not

Re: Left side variable interpolation during associative array assignment?

2001-12-31 Thread Peter Cornelius
Before I point to the problem here, let me point out that you are trying to use symbolic references which will severely decrease the readability of your code. I personally believe that symbolic references are one of the many forms of evil perl which, while appearing elegant, merely lure you

RE: Left side variable interpolation during associative array assignment?

2001-12-31 Thread Hanson, Robert
hat they can't be done. Rob -Original Message- From: Andrew Koebrick [mailto:[EMAIL PROTECTED]] Sent: Monday, December 31, 2001 4:02 PM To: [EMAIL PROTECTED] Subject: Left side variable interpolation during associative array assignment? I am trying to build up associative arrays us

Re: FW: associative array of arrays

2001-09-23 Thread Troy Denkinger
ve arrays are usually called "hashes" these days, so don't be thrown when you don't see references to "associative array". I hope that's some help. Regards, Troy -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

FW: associative array of arrays

2001-09-22 Thread Zysman, Roiy
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

Re: Associative array

2001-08-17 Thread Dusan Juhas
Hi, not directly. But do st. like: @foo = "some string"; @new_foo = split(//,$foo[0]); now you can access $new_foo[6] Not very witty but useful ;-) At 10:14 AM 8/14/01 -0700, Eric Wang wrote: >Hi guys, > >Got a quick question. >If I let @foo = "some string"; >can I access say the "t" in this st

Re: Associative array

2001-08-14 Thread Peter Scott
s an lvalue is to specify the replacement string as the 4th argument. This allows you to replace parts of the EXPR and return what was there before in one operation, just as you can with splice(). >Thanks for your help. > >Eric > &g

Re: Associative array

2001-08-14 Thread Peter Scott
An associative array is the old name for a hash, which isn't what you're using. At 10:14 AM 8/14/01 -0700, Eric Wang wrote: >Hi guys, > >Got a quick question. >If I let @foo = "some string"; >can I access say the "t" in this string by using $foo[6] ?

Associative array

2001-08-14 Thread Eric Wang
Hi guys, Got a quick question. If I let @foo = "some string"; can I access say the "t" in this string by using $foo[6] ? thanx eric * *Eric T. Wang * *Bioinformatic Support and SRA

Re: Problem with associative array

2001-07-12 Thread Paul
--- jatuporn <[EMAIL PROTECTED]> wrote: > I try to write a program that reads a file with two fields.The first > field is a costumer ID and the second is the costumer name by using " > ! " as a seperator between 2 fields. Store costumer ID as the key and > the costumer name as value into a hash.

Re: Problem with associative array

2001-07-12 Thread Jeff 'japhy' Pinyan
On Jul 12, jatuporn said: >I try to write a program that reads a file with two fields.The first >field is a costumer ID and the second is the costumer name by using " ! >" as a seperator between 2 fields. Store costumer ID as the key and the >costumer name as value into a hash. > >My code is belo

RE: Problem with associative array

2001-07-12 Thread Mooney Christophe-CMOONEY1
Ah -- of course. you need to chomp your $key when you read from STDIN. -Original Message- From: jatuporn [mailto:[EMAIL PROTECTED]] Sent: Thursday, July 12, 2001 9:54 AM To: [EMAIL PROTECTED] Subject: Problem with associative array I try to write a program that reads a file with two

Problem with associative array

2001-07-12 Thread jatuporn
I try to write a program that reads a file with two fields.The first field is a costumer ID and the second is the costumer name by using " ! " as a seperator between 2 fields. Store costumer ID as the key and the costumer name as value into a hash. My code is below, I have a problem that $inf

Problem with associative array

2001-07-12 Thread jatuporn
I try to write a program that reads a file with two fields.The first field is a costumer ID and the second is the costumer name by using " ! " as a seperator between 2 fields. Store costumer ID as the key and the costumer name as value into a hash. My code is below, I have a problem that $info{

Re: Associative array of a normal array

2001-06-26 Thread Chas Owens
Short answer: Yes. Medium answer: Sort of, but they need to references to arrays not arrays Long answer: A hash (common term for associative array) contains a scalar key and a scalar value. A scalar value can be (not inclusive) a number, a string, or a reference. Since we can generate a

Associative array of a normal array

2001-06-26 Thread Paul Murphy
Hi all. Is there any way in Perl to set up an associative array of normal arrays? So the key would be an arbitrary string, and the value for instance would be an array of numbers. I'll explain what I want to do, as their may well be better ways: Suppose I have a file like this: Hel