> "JG" == Jim Green writes:
JG> i have a question for the following perl code, by changing the value
JG> in %h3, the script also changes the value for %h4, I vaguely
JG> understand it is because %h3's key is reference to %h2, %h2's key is
JG> reference to %h1,
JG> so by changing v
Jim Green wrote:
> i have a question for the following perl code, by changing the value
> in %h3, the script also changes the value for %h4, I vaguely
> understand it is because %h3's key is reference to %h2, %h2's key is
> reference to %h1,
>
> so by changing value in %h3, the script also change
i have a question for the following perl code, by changing the value
in %h3, the script also changes the value for %h4, I vaguely
understand it is because %h3's key is reference to %h2, %h2's key is
reference to %h1,
so by changing value in %h3, the script also changes the value for %h4,
I was wo
Subject: RE: reference question
V.Ramkumar wrote:
Hi List,
How to find out the existence of duplicate values in perl array.
What does that have to do with "reference question"?
John
--
Perl isn't a toolbox, but a small machine shop where you
can special-order certain sorts
Hi List,
How to find out the existence of duplicate values in perl array.
Regards,
Ramkumar
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/
Rob Dixon wrote:
Richard Lee wrote:
one more question on reference,
if say you have sub as below
Your code is badly wrong. Please let me correct it first.
my @arrayref;
sub do_something {
my $something = @_;
That will set $something to the number of parameters pas
From: ""Chris Charley""
From: "Richard Lee"
one more question on reference,
if say you have sub as below
my @arrayref;
sub do_something {
my $something = @_;
open FILE, "$something", or die;
while () {
my @array = map (split /,/)[1,2,3,5];
push @a
From: "Richard Lee"
one more question on reference,
if say you have sub as below
my @arrayref;
sub do_something {
my $something = @_;
open FILE, "$something", or die;
while () {
my @array = map (split /,/)[1,2,3,5];
push @arrayref, [EMAIL PROTECTED
Richard Lee wrote:
>
> one more question on reference,
>
> if say you have sub as below
Your code is badly wrong. Please let me correct it first.
> my @arrayref;
>
> sub do_something {
> my $something = @_;
That will set $something to the number of parameters passed in @_
To retrieve
one more question on reference,
if say you have sub as below
my @arrayref;
sub do_something {
my $something = @_;
open FILE, "$something", or die;
while () {
my @array = map (split /,/)[1,2,3,5];
push @arrayref, [EMAIL PROTECTED];
}
clos
On Sep 28, Dave Adams said:
#!/usr/bin/perl -w
use strict;
use Data::Dumper;
my $grades = {"tom"=> 50, "sally"=> 60, "harry" => 70};
print Dumper($grades) ;
And perl gives me this:
$VAR1 = {
'harry' => 70,
'sally' => 60,
'tom' => 50
};
QUESTION: Does this mea
When I do this:
#!/usr/bin/perl -w
use strict;
use Data::Dumper;
my $grades = {"tom"=> 50, "sally"=> 60, "harry" => 70};
print Dumper($grades) ;
And perl gives me this:
$VAR1 = {
'harry' => 70,
'sally' => 60,
'tom' => 50
};
QUESTION: Does this mean that $
Thanks Rob,
My MUA believes you used Internet Mail Service (5.5.2653.19)
to write the following on Friday, August 8, 2003 at 8:43:43 AM.
HR> # store access the internal hash by following the reference "->"
$hash{four}->>{uid} = "uid4";
$hash{four}->>{cn} = "cn4";
$hash{four}->>{group} = "Group4";
Tim Musson wrote:
> beginners,
>
> I am trying to build a hash of hash references. My problem is that I
> need to be able to add a key/value pair to the internal hashes...
>
> ,- [ Here is my test code (yes, I am working with LDAP) ] #!perl
> use strict;
> use warnings;
>
> my %hash = (
Hanson, Rob wrote:
> > Any suggestions on how I can do this?
>
> Yes.
>
> # init the hash key
> $hash{four} = {} unless exists $hash{four};
Due to autovivication, this is not necessary.
>
> # store access the internal hash by following the reference "->"
> $hash{four}->{uid} = "uid4"; $hash{fo
beginners,
I am trying to build a hash of hash references. My problem is that I
need to be able to add a key/value pair to the internal hashes...
,- [ Here is my test code (yes, I am working with LDAP) ]
#!perl
use strict;
use warnings;
my %hash = (
one => { uid => "uid1", cn => "c
up} = "Group4";
Rob
-Original Message-
From: Tim Musson [mailto:[EMAIL PROTECTED]
Sent: Friday, August 08, 2003 8:31 AM
To: [EMAIL PROTECTED]
Subject: Another reference question (hash of hash references)
beginners,
I am trying to build a hash of hash references. My problem
I have the Camel book, and while it doesn't go very far into detail
concerning XML, CGI or similar technologies, it does give a general idea. I
do hold to the fact that is the best reference book for the Perl language
itself. If you want to go into the specifics I'd recommend one of the books
that
From: "FORGHANI,BEHDAD (A-Spokane,ex1)" <[EMAIL PROTECTED]>
> I am trying to make a two dimentional array. I have a function that
> returns an array. The following code works:
>
> @x = f();
> push(@y, \@x);
>
> and then I can reference it @{@y[$i]}[$j};
You should write the code above like this
> I am trying to make a two dimentional array. I have a
> function that returns an array. The following code works:
>
> @x = f();
> push(@y, \@x);
>
> and then I can reference it @{@y[$i]}[$j};
>
> Is this the best way to make two dimentional arrays; I.e.,
> using push and reference to arrays
rom: FORGHANI,BEHDAD (A-Spokane,ex1)
[mailto:[EMAIL PROTECTED]]
Sent: Monday, March 25, 2002 4:13 PM
To: [EMAIL PROTECTED]
Subject: Newbie reference question
Hello,
I am trying to make a two dimentional array. I have a function that returns
an array. The following code works:
@x = f();
push(@y,
Hello,
I am trying to make a two dimentional array. I have a function that returns
an array. The following code works:
@x = f();
push(@y, \@x);
and then I can reference it @{@y[$i]}[$j};
Is this the best way to make two dimentional arrays; I.e., using push and
reference to arrays?
Also, I was
On Mon, Apr 23, 2001 at 07:32:32PM -, Stout, Joel R wrote:
> Speaking of aging camels, is the Camel book still the best reference to
> have? I am new to Perl and have the Llama book. It's been a good starting
> place but one day I see myself moving past it. I would like something that
> co
Speaking of aging camels, is the Camel book still the best reference to
have? I am new to Perl and have the Llama book. It's been a good starting
place but one day I see myself moving past it. I would like something that
covers the language in more detail and deals with Data Munging, XML, CGI,
24 matches
Mail list logo