Loading ...
Sorry, an error occurred while loading the content.

chop a string

Expand Messages
  • prakash
    hi how can i chop a string in to array of 8 characters.. ??? is there any easy way ?? thanks.. i am working on the Crypt::Simple module.. and i am getting 8
    Message 1 of 2 , May 2, 2003
    • 0 Attachment
      hi how can i chop a string in to array of 8 characters.. ???

      is there any easy way ?? thanks..

      i am working on the Crypt::Simple module.. and i am getting 8 byte error..

      -prak
    • Hans Ginzel
      ... Do yopu mean somenthing like this: @array = split //, $scalar, 8; OR @array = grep {$_ ne } split /(........)/, $scalar; ? perldoc -f split; Hans
      Message 2 of 2 , May 3, 2003
      • 0 Attachment
        On Fri, May 02, 2003 at 04:39:38PM -0700, prakash wrote:
        > hi how can i chop a string in to array of 8 characters.. ???
        > is there any easy way ?? thanks..

        Do yopu mean somenthing like this:

        @array = split //, $scalar, 8;
        OR
        @array = grep {$_ ne ""} split /(........)/, $scalar;
        ?

        perldoc -f split;

        Hans
      Your message has been successfully submitted and would be delivered to recipients shortly.