Re: push(@everyline, $_); vers $longstring .= $_;

2001-06-02 Thread Chas Owens
Just because this is a beginners list: { local $/; $entire_file = ; } works because (please correct me if I am wrong) { # blocks get their own variable scope this is done so that we # can muck with $\ without affecting surrounding code local $/; # this is easier to see if yo

Re: push(@everyline, $_); vers $longstring .= $_;

2001-06-01 Thread Jeff Pinyan
On Jun 2, David Gilden said: >Is one of these preferred over the other? > >while(){ >push(@everyline, $_); > } > >$longstring = join("",@everyline); >@oldentries = split(//,$longstring); It's kinda silly to make an array, just to join the elements together later. Use a strin

push(@everyline, $_); vers $longstring .= $_;

2001-06-01 Thread David Gilden
Is one of these preferred over the other? open(FROMFILE,$filename); while(){ push(@everyline, $_); } $longstring = join("",@everyline); @oldentries = split(//,$longstring); ---OR--- open(FROMFILE,$filename); while (){ $longstring .= $_; } @ent