Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!zaphod.mps.ohio-state.edu!ncar!boulder!jorgy From: jorgy@boulder.Colorado.EDU (Eric R. Jorgensen) Newsgroups: comp.lang.perl Subject: Simple perl question Message-ID: <24941@boulder.Colorado.EDU> Date: 20 Aug 90 20:21:12 GMT Sender: news@boulder.Colorado.EDU Reply-To: jorgy@refuge.colorado.edu (Eric R. Jorgensen) Organization: University of Colorado, Boulder Lines: 28 I have come across the following problem I have been unable to solve since I am new to perl programming, I have input that looks like: x 1 x 5 x 6 x 7 y 25 y 26 And I would like output like: x 1,5-7 y 25-26 I would be very appreciative if someone could help me, or at least point me in the direction of a similar example. Thanks in advance, jorgy Eric R. Jorgensen internet: jorgy@boulder.colorado.edu University of Colorado, Boulder uucp: ...!{ncar|nbires}!boulder!jorgy bitnet: jorgy@colorado.BITNET "Women. Can't live with 'em, pass the beer nuts." -- Norm on Cheers