in reply to rebuilding a hash (more)
In terms of style points, you should be saying = -1, not = "-1"; there's no point in setting a string and then turning around and incrementing it; just use a number.
I assume you are using the split-up parts $filename2, etc. in code that you've trimmed away; if these are really unused, get rid of the split and join lines and just use $upload{$_} where you have $joined.
And I'd say $upload{$num} = $joined if $num != $_; no point in updating your database if nothing changed.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: rebuilding a hash (more)
by coldfingertips (Pilgrim) on Feb 20, 2004 at 10:26 UTC | |
by ysth (Canon) on Feb 20, 2004 at 16:05 UTC |