Re: removing element of array

From: Andrew Gaffney (agaffney_at_skylineaero.com)
Date: 05/15/04


Date: Fri, 14 May 2004 20:01:38 -0500
To: "Charles K. Clarkson" <cclarkson@htcomp.net>

Charles K. Clarkson wrote:
> Andrew Gaffney <agaffney@skylineaero.com> wrote:
> :
> : I tried to write a small test script to figure this out,
> : but I can't get anywhere. I used array references in my
> : test program, because I need to pull out an element from
> : an array through a ref and assign the result back to the
> : same array ref.
>
> I don't understand what result you want to assign to
> the original array ref. Give us an example of what you want
> to end up with and we can get you there.
>
> Starting with this:
>
> : my $array1 = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15];
>
> End up with:
>
> $array1 = ???
> $array2 = ???
> $array3 = ???

I was just using those as temporary variables. Basically, I want to end up with
an array that is [0, 1, 2, 3, 4, 5, 7, 8, 9, 10, 11, 12, 13, 14, 15] (missing
the 7th element in this case). I'm just trying to figure out how to remove an
arbitrary element from an array and not leave an empty space.

-- 
Andrew Gaffney
Network Administrator
Skyline Aeronautics, LLC.
636-357-1548


Relevant Pages

  • Using "Perl Best Practices" inside-out objects
    ... I'm having trouble returning an array from a class implemented ... The test script where I am attempting to retrieve an array from an ... sub getData{ ...
    (comp.lang.perl.misc)
  • Re: Using "Perl Best Practices" inside-out objects
    ... Below are two snippets of code: ... The test script where I am attempting to retrieve an array from an ... I think the main problem is on the line where I am assigning an array ...
    (comp.lang.perl.misc)
  • Re: removing element of array
    ... Andrew Gaffney wrote: ... I tried to write a small test script to figure this out, ... I used array references in my test program, because I need to pull out ... array ref. ...
    (perl.beginners)
  • RE: removing element of array
    ... Andrew Gaffney wrote: ... I tried to write a small test script to figure this out, ... I used array references in my ... the original array ref. ...
    (perl.beginners)
  • Re: Encryption with Python
    ... I'm also puzzeld with your results. ... Here is a little test script, ... which generates 16mb array and scans it. ... crypto method you are using is a secret, please give the basic idea, ...
    (comp.lang.python)