Hi,

you can use substr $myword, 1,3  function

Thanks,
Mahesh
On Sun, Oct 25, 2009 at 3:13 PM, Michael Alipio <daem0n...@yahoo.com> wrote:

> Hi,
>
> How do I split a word into n subsets?
>
> my $word = "thequickbrown"
>
>
> If I want three subsets I should be able to create:
>
> the
> heq
> equ
> ....
> upto
> ....
> own
>
>
> Using split function with limit of 3 gives me:
>
> t h equickbrown
>
>
>
> Any idea how to do this? I'm thinking maybe I can just split the whole
> string and push each character into array, then loop through the array,
> getting 3 elements set in the proces..
>
>
>
>
>
>
>
>
>
>
> --
> To unsubscribe, e-mail: beginners-unsubscr...@perl.org
> For additional commands, e-mail: beginners-h...@perl.org
> http://learn.perl.org/
>
>
>


-- 
Thanks,
MAhesh

Reply via email to