in reply to Difficulties with split

If I'm understanding you correctly, you want

@vals = unpack "(A2)*", $in;

Replies are listed 'Best First'.
Re^2: Difficulties with split
by ikegami (Patriarch) on Apr 27, 2009 at 23:48 UTC

    That doesn't work with strings internally encoded as UTF8 before 5.10.0 (and not at all before 5.8.0).

    If you're working with arbitrary characters, if you don't to mess with utf8::downgrade, or if you are worried about backwards compatibility, you can use the following instead:

    @vals = $in =~ /(..)/sg;
Re^2: Difficulties with split
by transiency (Sexton) on Apr 27, 2009 at 23:10 UTC
    W00t, that is indeed what i wanted, thank you almut. :)

    foreach(@the_wicked){sleep(0);}