John, VERY VERY NICE!!
No! this is not for school, but for a script that requires user inputs on special work request for work. Thanks! Jerry -----Original Message----- From: John W. Krahn [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 01, 2004 1:32 AM To: Perl Beginners Subject: Re: A simple way? A Perl way? Jerry Preston wrote: > Hi! Hello, > I am looking for a simple Perl way to decode the following, which can > be any grouping of number > > 2-8,9,11,18-21 > > Into > 2,3,4,5,6,7,8,9,11,18,19,20,21 $ perl -le' print join ",", map /(\d+)-(\d+)/ ? $1 .. $2 : $_, split /,/, "2-8,9,11,18-21"' 2,3,4,5,6,7,8,9,11,18,19,20,21 John -- use Perl; program fulfillment -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response> -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>