From:                   "scott [gts]" <[EMAIL PROTECTED]>
> read the documents!!!
> 
> delete $thing{'element'};
 
You too. And the messages you reply to.

Apostolia asked how to remove elements from arrays. NOT hashes 
(aka associative arrays) !
 
To get back to the original question ...

@a = qw(a b c d e f);
splice @a, 1, 2; # delete 2 items starting with $a[1]

See perldoc perlfunc

> > There are the pop and shift function for removing elements from the
> > front and the end of an array, but is there a way you can remove
> > elements from, say the middle? I have two arrays storing info, and I
> > need to search the array1 for all the elements of the array2, and I
> > would like to remove elements from both array1 and array2 that were
> > already found so that they won't be used again for the next search
> > again...(I would like to avoid ways of having temporary arrays and
> > copying elements from the original arrays to the temp ones...) any
> > thoughts?
> > 
> > Thanks
> > 
> > -Lia-
> > 
> >      Apostolia Schiza

And actualy you should consider using hashes instead. It will be 
quicker and easier.

Read perldoc perldata

HTH, Jenda


== [EMAIL PROTECTED] == http://Jenda.Krynicky.cz ==
: What do people think?
What, do people think?  :-)
             -- Larry Wall in <[EMAIL PROTECTED]>
_______________________________________________
Perl-Win32-Web mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-web

Reply via email to