[EMAIL PROTECTED] wrote: > Yet another great explanation..
What explanation? I see niothing above this. Please do not top-post when posting to this list. Instead, follow the material to which you are directly responding with your response, then trim any extraneous material. Most of us keep records of recent posts, and newsreaders will also thread them appropriately, so if people need the entire text of an original post, they can refer to it. > . thank you! But I still need to know how > to print each specific element # along with its data? > Is this the right way to go for storing each line in its own element??? > > while $line < FILEHANDLE > > my @tsm = < FILEHANDLE > Which do you want? This is a repeat of the same problem in your earlier post. ****Do each task once, and only once**** > foreach $_ (@tsm) If you explicitly assign a variable out of a for loop, make it a meaningful and descriptive variable name. The default variable is assigned automatically if you do not provide a variable to receive the values produced. Either: foraeach (@tsm) { # pronounce the word tsm aloud. Now say it ten time, fast. do something($_) } or foreach $thing_going_bump (@things_that_go_bump_in_the_night) { if (is_significant($thing_going_bump) { investigate_and_confront($thing_going_bump) } else { go_back_to_sleep(); } } Joseph -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>