in reply to A Not so Simple Append
Obviously, you've already been helped but I'd like to point out a few things.
@array is the array, if you want a single
value from the array, it is better to use $array[0]
rather than the @array[0] notation. Just so you
know, doing that the second way is an array slice.
See these alternatives:
#your way. my $far = @array[0]; my $dev = @array[3]; #"better" way my $far = $array[0]; my $dev = $array[3]; # using array slices properly my ($far, $dev) = @array[0,3];
Who knows, maybe that will help you out. =) Having it explained to me years ago sure did!
--
$you = new YOU;
honk() if $you->love(perl)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
RE: RE: A Not so Simple Append
by Limo (Scribe) on Oct 03, 2000 at 03:48 UTC |