undef an array

2001-06-01 Thread Scott Alexander
Hi, in my code I have my @upper_id ; during the code I pass the array by reference to a sub routine and push values onto it. push @{$upper_id}, $row[0] ; Some of my code I have arrays of strings or ints. I might add 100 or more items to each array. The strings could be 50 characters long.

Re: undef an array

2001-06-01 Thread Tom Mornini
On Fri, 1 Jun 2001, Scott Alexander wrote: Hi, in my code I have my @upper_id ; during the code I pass the array by reference to a sub routine and push values onto it. push @{$upper_id}, $row[0] ; This is odd syntax! Why not just: push @upper_id,$row[0]; I hope this isn't some sort

Re: undef an array

2001-06-01 Thread Ken Williams
block whose scope is limited to the request, it'll get properly cleaned up. If it's got file-scope or something undesirable like that, you'll have to clean it up manually - or better, just fix its scoping. BTW, I usually prefer '@array=();' to 'undef @array;', because I like to let Perl handle

Re: undef an array

2001-06-01 Thread Ken Williams
[EMAIL PROTECTED] (Tom Mornini) wrote: On Fri, 1 Jun 2001, Scott Alexander wrote: in my code I have my @upper_id ; during the code I pass the array by reference to a sub routine and push values onto it. push @{$upper_id}, $row[0] ; This is odd syntax! Why not just: push

Re: undef an array

2001-06-01 Thread Tom Mornini
On Fri, 1 Jun 2001, Ken Williams wrote: during the code I pass the array by reference to a sub routine and push values onto it. push @{$upper_id}, $row[0] ; This is odd syntax! Why not just: push @upper_id,$row[0]; I hope this isn't some sort of soft reference. Scott's is