#perl - Mon 2 Apr 2007 between 20:15 and 20:21



sparc_that would be confusing
Limbic_Regionthe use perl directive in TT is spelled PERL
archpolluxexactly
Ani-_What's next? Another templating system that uses PEARL? :/
Limbic_Regionwell, I have successfully avoided TT for years now, I see no reason to change now
archpolluxi guess i should've said a PERL directive instead of block
ksalso can an array contain a reference to arbitrary element of the same array ?
Limbic_Regionarchpollux - I would suggest posting it to the TT list though
archpolluxks: yes, it's called self-reference, causes memory leaks
Limbic_Region: good idea
Limbic_Regionks - you mean like my @array; @array = (\$array[1], 2);
archpollux - not necessarily
archpolluxLimbic_Region: but it might be a newbie question
kshm interesting, thanks archpollux
archpolluxyeah :)
Limbic_Regionarchpollux - the question was not to the same array but to another element within the same array
archpolluxLimbic_Region: i know, same thing
Limbic_Regionarchpollux - so it could lead to circular referencing but unlikely
no, it isn't
archpolluxthat's what i'm saying
ok, not the same thing
:P
Ani-_archpollux: not really.
buuHrm hrm hrm.
Ani-_archpollux: a memory leak would be the case if it was: my @array; $array[6] = \@array;
ksLimbic_Region i just wonder how linked lists might be organized in perl
buuks: The usual ways.
Limbic_Regionks - linked lists are almost always unnecessary in perl
buuDatastructures cointaining pointers.
Limbic_Regionks - but yeah, the usual ways work
Ani-_archpollux: what he asked (or atleast how I understood it): my @array; $array[6] = \$array[27]; Whici is just a reference to a scalar.
archpollux: if @array goes out of scope in the first example it will remain to exists. It will go away in the second example.
Limbic_Regionks - contrarary to what archpollux suggested, what you asked is not likely to lead to problems
ks - what archpollux thought you asked though is an issue
ks - confusing huh
ksyeah :)
things might be interpreted differently
Limbic_Regionbut I have only ever used linked lists in perl as an exercise in understanding data structures, I have never really needed one
kspeople are different
Limbic_Regionarchpollux - WRT it being a newbie question to the TT list - you can't get what you don't ask for - newbie or not

Page: 4 11 18 25 32 39 46 53 60 67 74 81 88 95 102 109 

IrcArchive