Stringifying data without newlines.

Discussion in 'Perl Misc' started by Stuart Moore, Jul 10, 2003.

  1. Stuart Moore

    Stuart Moore Guest

    I'm looking at ways to stringify large, simple data structures (i.e. non
    self-referential multi-dimensional data structures). They're to be passed
    over a socket to another perl process in the same machine - currently I
    use a newline as a "message terminator", I can change this if necessary
    but would perfer not to.

    Data::Dumper works with Indent 0 and Useqq 1 (and if the data contains no
    newlines I don't need Useqq 1) but it's still a little on the slow side, I
    was wondering whether any of the other modules (FreezeThaw, Storable etc)
    are also guaranteed not to contain newline characters in their stored
    version; neither documentation says anything on this matter.

    Any suggestions?

    Stuart Moore
     
    Stuart Moore, Jul 10, 2003
    #1
    1. Advertising

  2. Stuart Moore

    Bart Lateur Guest

    Stuart Moore wrote:

    >I
    >was wondering whether any of the other modules (FreezeThaw, Storable etc)
    >are also guaranteed not to contain newline characters in their stored
    >version


    As these produce a binary dump of the data, I would definitely think
    not.

    You could postprocess with base64 encoding..?

    --
    Bart.
     
    Bart Lateur, Jul 11, 2003
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. headware

    newlines in textboxes

    headware, Sep 22, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    348
    Girish Bharadwaj
    Sep 22, 2004
  2. Newlines in Datagrid

    , Sep 6, 2005, in forum: ASP .Net
    Replies:
    2
    Views:
    2,048
    RenyMatt
    May 4, 2009
  3. Rhino
    Replies:
    2
    Views:
    5,228
    Filip Larsen
    Dec 22, 2003
  4. Tom
    Replies:
    5
    Views:
    312
  5. Dick Davies
    Replies:
    1
    Views:
    116
    Gavin Sinclair
    Sep 29, 2005
Loading...

Share This Page