"Vijaya" schreef: > I think there are 3 possible ways to check the last element in your IF > condition inside Foreach loop. > > 1. $list[-1] eq $element > 2. $list[$#list] eq $element > 3. $list[scalar(@list)-1] eq $element
Those all will not work (reliably), because you compare the value, and the values of an array are not necessarily unique. -- Affijn, Ruud "Gewoon is een tijger." -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/