#29 IDE modify my array

closed-fixed
None
5
2002-05-26
2002-03-15
Anonymous
No

I put an array @buffer in the window "Variables" and fill it with 10 values.
The array will be shown with 10 elements. Great !
I make @buffer = ();
The IDE show furthermore 10 elements and so my array grow to 10 elements, because perl
appende these 10 elements. Thats to grate.

Discussion

  • Logged In: YES
    user_id=486571

    The same occurs with Hash und Hashreference.

    use strict;
    my $h={};
    print(scalar(%$h)." \n");
    $h->{"A"} = "Anton";
    $h->{"B"} = "Berta";
    print(scalar(%$h)." \n");
    $h={};
    print(scalar(%$h)." \n");
    print("end\n");

    my %h;
    print(scalar(%h)." \n");
    %h->{"A"} = "Anton";
    %h->{"B"} = "Berta";
    print(scalar(%h)." \n");
    %h=();
    print(scalar(%h)." \n");
    print("end\n");

    output
    0
    2/8 # hier you must expand the Variablesview with +
    2/8
    end

    0
    2/8 # hier you must expand the Variablesview with +
    2/8
    end

     
    • status: open --> closed
     
    • assigned_to: nobody --> jguentherodt
    • status: closed --> closed-fixed