M. Lewis wrote: > > I now we can push (concatenate) data onto an array. > > I would assume that we could concatenate data on to a string as well > with something like: > > $newstring = $oldstring . $newdata
Yes. > Maybe this isn't correct though. I've not yet tried it. > > My question is one method 'better' than the other? If so, why so? > > Assuming there is no difference, then perhaps the determination of which > to use is dependent entirely on what is to be done with the data later > in the program. It depends on the data and what you want to do with it. Strings and string operations are usually more efficient than arrays and although most arrays can be simulated using strings there are some list/array operations that are not possible or harder to do on strings. So what kind of data are you talking about? :-) John -- Perl isn't a toolbox, but a small machine shop where you can special-order certain sorts of tools at low cost and in short order. -- Larry Wall -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/