develooper Front page | perl.beginners | Postings from April 2008

split a string

Thread Next
From:
Dermot
Date:
April 14, 2008 08:45
Subject:
split a string
Hi,

I am trying to split a string on every 9th character. I thought that this

my @list = split(/.{9}/, $string);

might do it but it doesn't work.

I thought about using splice but the string is a scalar. If I coudl
force it into an array that would help.

Has anyone got any ideas?
Thanx,
Dp.

Thread Next


Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About