adrive has asked for the wisdom of the Perl Monks concerning the following question:
$sentence = "5:83:24"; print split(/:/, $sentence)[1]; #returns 83
split(/:*/, $sentence); #which should return 24
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: how to split a string and take certain position?
by mr_mischief (Monsignor) on Sep 24, 2007 at 04:13 UTC | |
|
Re: how to split a string and take certain position?
by mreece (Friar) on Sep 24, 2007 at 04:26 UTC | |
|
Re: how to split a string and take certain position?
by adrive (Scribe) on Sep 24, 2007 at 06:05 UTC | |
by ikegami (Patriarch) on Sep 24, 2007 at 06:13 UTC | |
|
Re: how to split a string and take certain position?
by adrive (Scribe) on Sep 24, 2007 at 04:28 UTC | |
by erroneousBollock (Curate) on Sep 24, 2007 at 04:34 UTC | |
by ikegami (Patriarch) on Sep 24, 2007 at 04:52 UTC |