Hi, I want to save names from <STDIN> to an array. Afterwards I want to delete a single name in the array received again from <STDIN>.
This is what I have: #!/usr/bin/perl use warnings; print "Some names please: \n"; @names = <STDIN>; print "Delete one name? \n"; $deleted = <STDIN>; foreach $item (@names) { unless ($item eq $deleted){ push (@aonly, $item); } }; print "Your names:\n", @aonly, "\n"; My question is how can I delete an element of the array directly (something like pop (@names, $item); ). Is there a chance to delete it without using the index? Oliver -- ... don't touch the bang bang fruit -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>