I want to define a hash reference like this:
my $h={
a = 'a',
b = 'aa \
bbb',
};
(Note the string containing escaped newlines.)
Now, the point is that I have the block
a = 'a',
b = 'aa \
bbb',
in a text file. It
On 2/27/07, Jorge Almeida [EMAIL PROTECTED] wrote:
I want to define a hash reference like this:
my $h={
a = 'a',
b = 'aa \
bbb',
};
(Note the string containing escaped newlines.)
Now, the point is that I have the block
a = 'a',
On Tue, 27 Feb 2007, Adriano Ferreira wrote:
On 2/27/07, Jorge Almeida [EMAIL PROTECTED] wrote:
Let's say your data is in the file data.pl. Then
my %hash = do data.pl;
my $hash_ref = \%hash;
Great!
Thanks.
--
Jorge Almeida
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For
-Original Message-
From: John W. Krahn [mailto:[EMAIL PROTECTED]
Sent: Sunday, February 18, 2007 4:15 PM
To: Perl Beginners
Subject: Re: Inefficient code?
Johnson, Reginald (GTI) wrote:
My code is comparing the variables node and db in one input file to
bkup_node and bkup_db in the
how good is 'crypt()'? it seems that for small differences in the target
string you get duplicate digests. i get the following results (using
debugger):
DB1 $f='aaab'
DB2 $g='aaac'
DB3 p crypt($f,'ab')
On 2/27/07, tom arnall [EMAIL PROTECTED] wrote:
how good is 'crypt()'? it seems that for small differences in the target
string you get duplicate digests.
That's not what it's good at. Are you trying to use it for
checksumming or encryption, or something else it wasn't designed to
do?
i get
Hi: I just can't seem to figure this out.
I am trying to declare two associative array
(%nodeowner and %nodeseverity) within another array
called %SESSION
For example
%nodeowner = (node1, john, node2, nancy);
%nodeseverity = (node1, 5, node2, 10);
How do I declare %SESSION containing %nodeowner
On 2/27/07, tom arnall [EMAIL PROTECTED] wrote:
how good is 'crypt()'? it seems that for small differences in the target
string you get duplicate digests. i get the following results (using
debugger):
snip
Better than rot13, but worse than most other forms of encryption. The
crypt function is
One correction: SESSION is just a single dimensional
array @SESSION.
Thanks
Ravi
--- Ravi Malghan [EMAIL PROTECTED] wrote:
Hi: I just can't seem to figure this out.
I am trying to declare two associative array
(%nodeowner and %nodeseverity) within another array
called %SESSION
For example
well first of all you're using the syntax for non-associative arrays
(normal @arrays). your hash declarations should look like this:
%nodeowner = (node1 = john, node2 = nancy);
%nodeseverity = (node1 = 5, node2 = 10);
as for %SESSION, you could make a hash with reference to hash values:
ah. well in that case
@SESSION = ( \%nodeowner, \%nodeseverity );
On Feb 27, 2007, at 11:59 AM, Ravi Malghan wrote:
One correction: SESSION is just a single dimensional
array @SESSION.
Thanks
Ravi
--- Ravi Malghan [EMAIL PROTECTED] wrote:
Hi: I just can't seem to figure this out.
I am
Johnson, Reginald (GTI) wrote:
From: John W. Krahn [mailto:[EMAIL PROTECTED]
Johnson, Reginald (GTI) wrote:
foreach $bkline (@bkupArray) {
my
($bkup_node_ora,$bkup_db,$bk_blank,$id,$type,$cap,$start,$filler,$filler2,$filler3,$filler4,$bk_end,$rest)=
Ravi Malghan wrote:
Hi: I just can't seem to figure this out.
I am trying to declare two associative array
(%nodeowner and %nodeseverity) within another array
called %SESSION
For example
%nodeowner = (node1, john, node2, nancy);
%nodeseverity = (node1, 5, node2, 10);
How do I declare
what am I doing wrong here when trying to access the
value john for node1
=
$SESSION{FirstRun} = 1;
%nodeowner = (node1, john, node2, nancy);
push(@SESSION, %nodeowner);
print node1: $SESSION{$nodeowner{node1}}\n;
==
Thanks
Ravi
--- Neal Clark [EMAIL PROTECTED] wrote:
ah. well
On 2/27/07, Ravi Malghan [EMAIL PROTECTED] wrote:
Hi: I just can't seem to figure this out.
I am trying to declare two associative array
Just call them hashes, everybody else does.
(%nodeowner and %nodeseverity) within another array
called %SESSION
For example
%nodeowner = (node1, john,
you are working with two different variables.
On Feb 27, 2007, at 12:24 PM, Ravi Malghan wrote:
what am I doing wrong here when trying to access the
value john for node1
=
$SESSION{FirstRun} = 1;
this line creates a _hash_, %SESSION with one element (keyed by
FirstRun, value is 1).
On 2/27/07, Ravi Malghan [EMAIL PROTECTED] wrote:
what am I doing wrong here when trying to access the
value john for node1
=
$SESSION{FirstRun} = 1;
%nodeowner = (node1, john, node2, nancy);
push(@SESSION, %nodeowner);
print node1: $SESSION{$nodeowner{node1}}\n;
snip
Off that bat I
On 2/27/07, Neal Clark [EMAIL PROTECTED] wrote:
snip
sorry about saying you had the wrong syntax earlier, i thought it
was. i never knew you could do hashes with the comma operator. neat.
i don't think its very clear syntactically but if it works it works :-)
snip
In Perl 5 the only difference
Neal Clark wrote:
you are working with two different variables.
On Feb 27, 2007, at 12:24 PM, Ravi Malghan wrote:
what am I doing wrong here when trying to access the
value john for node1
=
$SESSION{FirstRun} = 1;
this line creates a _hash_, %SESSION with one element (keyed by
Chas Owens wrote:
On 2/27/07, Neal Clark [EMAIL PROTECTED] wrote:
snip
sorry about saying you had the wrong syntax earlier, i thought it
was. i never knew you could do hashes with the comma operator. neat.
i don't think its very clear syntactically but if it works it works :-)
snip
In
All,
I am having an issue getting my cgi calender to print
correctly. Any help or hints would be appreciated!
I was thinking of manipulating the @weeks_anonymous
array with select dayofweek(curdate()) rather than
using hardcoed undef's
Problem: cgi calender daynames are not matching up
with
--- oryann9 [EMAIL PROTECTED] wrote:
All,
I am having an issue getting my cgi calender to
print
correctly. Any help or hints would be appreciated!
I was thinking of manipulating the @weeks_anonymous
array with select dayofweek(curdate()) rather than
using hardcoed undef's
Problem:
22 matches
Mail list logo