Ryan,

Thanks, that makes sense now.

Cedric

> Subject: OT: Perl
> From: "Ryan Emerle" <[EMAIL PROTECTED]>
> Date: Wed, 17 Sep 2003 10:05:49 -0400
> Thread:
http://www.houseoffusion.com/cf_lists/index.cfm?method=messages&threadid=27180&forumid=4#137291
>
> %children is an associative array (hash/struct) dereferenced using the
syntax $children{key}.
>
> %line is also an associative array.
>
> $children{key}'s value is an array.
>
> In CF, %children is a struct that contains arrays for the value at each
key.
>
> That is,
> <cfset children["my_key"]=ArrayNew(1)>
> <cfset arrayAppend(children["my_key"],my_value)>
>
> HTH
> Ryan
>
> -----Original Message-----
> From: Cedric Villat [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, September 16, 2003 11:46 PM
> To: CF-Talk
> Subject: OT: Perl
>
>
> Ok, sort of off topic, but I'm trying to convert a perl program to CF. I'm
> stuck on a line and have no idea what it's equivalent is in CF. The line
is:
>
> push @{ $children{$line{"p1"}}}, shortname($line{"node"});
>
> I assume $children is an array, and $line is a single line of an input
file.
> What exactly does the $children{$line{"p1"}} mean? How are they indexing
an
> array based on a string? Any ideas?
>
> Cedric
>
>
>


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Message: http://www.houseoffusion.com/lists.cfm?link=i:4:137324
Archives: http://www.houseoffusion.com/lists.cfm?link=t:4
Subscription: http://www.houseoffusion.com/lists.cfm?link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Get the mailserver that powers this list at 
http://www.coolfusion.com

Reply via email to