in reply to splitting a string into arbitrary lengths

Try unpack:
($tyear, $tmon, $tday) = unpack("a4a2a2", $today);

Paul

Replies are listed 'Best First'.
Re^2: splitting a string into arbitrary lengths
by ryanc (Monk) on Jun 22, 2005 at 21:41 UTC
    ahh, very nice...thanks!

      (un)pack will likely be the fastest way to do this. Don't forget you can put spaces in appropriate places in the pattern to make it easier to read. (I say 'pack' because the useful documentation for 'unpack' is in 'pack'. :-)

      ---
      $world=~s/war/peace/g