Dru has asked for the wisdom of the Perl Monks concerning the following question:
Any help is appreciated.foreach (@nums){ push (@even, $_) if /\/2/; #match all numbers that are even push (@odd, $_) if /^\/2/; #match all odd numbers }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Match all Odd and Even Numbers
by Bilbo (Pilgrim) on Jun 17, 2003 at 13:01 UTC | |
|
Re: Match all Odd and Even Numbers
by broquaint (Abbot) on Jun 17, 2003 at 13:01 UTC | |
|
Re: Match all Odd and Even Numbers
by diotalevi (Canon) on Jun 17, 2003 at 13:46 UTC | |
|
Re: Match all Odd and Even Numbers
by particle (Vicar) on Jun 17, 2003 at 12:58 UTC | |
|
Re: Match all Odd and Even Numbers
by gellyfish (Monsignor) on Jun 17, 2003 at 14:02 UTC | |
|
Re: Match all Odd and Even Numbers
by hardburn (Abbot) on Jun 17, 2003 at 14:03 UTC | |
|
Re: Match all Odd and Even Numbers
by benn (Vicar) on Jun 17, 2003 at 13:14 UTC | |
|
Re: Match all Odd and Even Numbers
by Dr. Mu (Hermit) on Jun 18, 2003 at 06:49 UTC | |
by Dru (Hermit) on Jun 18, 2003 at 13:00 UTC | |
by bimleshsharma (Beadle) on Oct 12, 2012 at 06:27 UTC | |
by Anonymous Monk on Oct 12, 2012 at 06:30 UTC |