in reply to A simple foreach question
If I run your script and enter 2, 3, and 4 each followed by a return, and then an end of file (e.g.cntrl Z in DOS), I get betty barney and dino. Same result if I put the numbers in a file on distinct lines. However, if you put the list of numbers all on one line they all get read by the diamond operator as a line, and it looks like that string gets interpreted as just a 2 inside the brackets, (I get betty in that case, not fred.)
chas