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
> >>
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
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);
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
> "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
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:
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
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
> 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
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
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
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
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
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
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]
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
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
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
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] ?
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
--- 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.
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
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
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
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{
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
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
27 matches
Mail list logo