> -----Original Message----- > From: Sharat Hegde [mailto:[EMAIL PROTECTED]] > Sent: Friday, December 21, 2001 4:36 AM > To: [EMAIL PROTECTED] > Subject: Deleting from a list > > > Hello, > > I need to delete an element from a list (array). The delete > function does > not seem to work. For example if I need to delete element > number "i" from > the list "myList", then the code > > delete ($myList[$i]); > > does not seem to be working. Gives a compilation error.
What version of Perl are you using? delete() for array elements seems to be a 5.6 feature. If you are using an earlier version, use splice(). -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]