in reply to Delete/Add a string in an array

u can use pop, shift, unshift, push and splice
those links should help you out

(just noticed somebody posted before me)

Replies are listed 'Best First'.
Re^2: Delete/Add a string in an array
by mantadin (Beadle) on Apr 25, 2006 at 05:35 UTC
    my @arr = ( "foo", "bar" ); print @arr, "\n"; # append a scalar push @arr, "post"; print @arr, "\n"; # and remove it again my $s = pop @arr; print "== popped the last one: $s ==\n"; print @arr, "\n"; # prepend a scalar unshift @arr, "pre"; print @arr, "\n"; # and remove it my $t = shift @arr; print "== shifted the first one: $t ==\n"; print @arr, "\n";