in reply to Re: string replacement question
in thread string replacement question

Hi I ain't sure about using width because the whole line content is read from a file, so it varies.
I look up both pack/unpack and they seem to deal with ascii?
not quite sure the pack/unpack for hiascii or dbcs case? can you give an example? thankx

Replies are listed 'Best First'.
Re^3: string replacement question
by Zaxo (Archbishop) on Nov 30, 2005 at 07:28 UTC

    I was treating your data as fixed-width fields, confused by the unformatted version I guess.

    Can you usually get useful arrays out with split ',' ?. If so, follow the CSV search for lots of possibilities. The data looks like CSV now that it's laid out.

    Pack and unpack have several formats for dealing with ascii data - very useful for fixed width fields, but probably not what you need for this file.

    After Compline,
    Zaxo