On Thu, Apr 21, 2011 at 04:33:27PM -0230, Tiago Hori wrote: > Hey Guys, > > I am a real beginner so at the risk of being slammed by some, I wanted to > get some input.
I certainly hope you don't get slammed, but I understand the trepidation. > Hi Betty! I've seen: Fred Barney Wilma > So I worked on it for a while and got something really close to what is in > the answers, but what you get as an output is grammatically incorrect, it is > missing the commas and such. I figured that in reality, eventually in the > real world, I would want the output to be correct or at least tab delimited. > So I went about trying to get commas in and I came up with this: Take a look at the join() function: $ perldoc -f join That will get you most of the way there, though you'll probably still need to do something special for the "and" part. Also, be careful if you've only seen a single person before. > I am no perl expert, but this code looks really clunky to me, so I was just > looking for some input. Your code isn't bad at all. The indentation is wrong, but that might be some problem with mailing it. Come back to the list if these hints are insufficient. Good luck. -- Paul Johnson - p...@pjcj.net http://www.pjcj.net -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/