[ILUG] Perl regex question
Lee Hosty
hostyle at csn.ul.ie
Fri Oct 25 15:42:06 IST 2002
At 02:40 PM 25/10/2002 +0100, you wrote:
>3. I don't know perl so here's the python equivalent:
>
>for id in "1|2|86|907|7".split("|"):
> print "id=" + id
map { print "id=$_\n" } split('\|',$id_string);
perhaps its easier to understand this way:
foreach (split('\|',$id_string)) {
print "id=$_\n";
}
Lee Hosty -x- hostyle AT csn.ul.ie -x- +353 (0)86 8768780
--
EWELME (n.)
The smile bestowed on you by an air hostess.
More information about the ILUG
mailing list