Re: Tie::File problem (or is it just me?)

From: Graeme St. Clair (Graeme.St.Clair_at_hds.com)
Date: 03/08/05

  • Next message: Chris Devers: "Re: LIB path question"
    To: beginners@perl.org
    Date: Mon, 7 Mar 2005 19:43:40 -0800 
    
    

    -----Original Message-----
    From: news [mailto:news@sea.gmane.org] On Behalf Of Hendrik Maryns
    Sent: Monday, March 07, 2005 5:58 PM
    To: beginners@perl.org
    Subject: [Released] [Contains offensive content] Re: Tie::File problem (or
    is it just me?)

    John W. Krahn schreef:
    > Hendrik Maryns wrote:
    >
    >> Kevin Horton schreef:
    >>
    >>>
    >>> What kind of line endings does the file have? If I recall
    >>> correctly, I ran into a problem where perl did not recognize
    >>> classical Macintosh line endings as ending a line. It thought the
    >>> whole file was one line, until I converted the line endings to Unix
    format.
    >>
    >>
    >> That must be the problem! I work on WinXP (for the moment). The
    >> file is generated by ChatZilla, the IRC chat program part of the
    >> Mozilla suite. I don't know what kind of line endings it uses, how
    >> can I see this?
    >
    >
    > According to RFC 1459:
    >
    > IRC messages are always lines of characters terminated with a CR-LF
    > (Carriage Return - Line Feed) pair, and these messages shall not
    > exceed 512 characters in length, counting all characters including
    > the trailing CR-LF. Thus, there are 510 characters maximum allowed
    > for the command and its parameters. There is no provision for
    > continuation message lines. See section 7 for more details about
    > current implementations.
    >
    >
    > However when you save that data to a file the line endings are
    > determined by the application that saves that data and to some extent
    > by the operating system.

    I do understand, but is there a trick in Windows to get to see which chars
    are used as newline chars in a particular file, i.e. to show ASCII chars?

    Thanks for your help on splice and -i, I understand now!

    H.

    ########

    The only one I know comes with that fine editor TextPad, which you can
    download for trial for free from www.textpad.com, or even pay for, I think
    maybe about 30 USD.

    Use Ctrl O, then under File Format in the new window, choose "Binary", and
    "Open" and inspect to your heart's content!

    HTH, rgds, GStC.


  • Next message: Chris Devers: "Re: LIB path question"

    Relevant Pages

    • Re: RegExp to find hex value 0D fails
      ... of Windows. ... me that using the \x format should find exactly the byte with that value, regardless of how the local meaning may be defined. ... the 8D is correct, that is the code for the soft CR in the old editor format, which is what I'm trying to eliminate. ... 0D is a normal CR, but those are okay where they are, so I don't want to find normal newline characters, only the old soft ones, and I know of no other way to get them beside the hex code, but that's not working. ...
      (microsoft.public.scripting.vbscript)
    • Re: Blue Screen Stop when loading XPhome see insde for data
      ... I took the backup C:drive image disk and formatted and partitioned it using ... theSegate Wizard (Ialso did a format using the disk management program in ... Each time I try to install Windows XP Home it boots from the CD and ... And it is not just the first two characters of your code that are ...
      (microsoft.public.windowsxp.help_and_support)
    • Re: Varying Column Widths for Text Import
      ... But you didn't describe each field for Format 2 and format 3. ... combined length of 36 characters). ... (whatever the lengths may be...) ...
      (microsoft.public.excel.misc)
    • Re: encodings / printing and tclodbc
      ... > ukranien etc characters, they just show up as wierd chars. ... Under Windows XP and Windows 2000 Michael ... Of course system encoding on my system is set to cp1251. ...
      (comp.lang.tcl)
    • format() and hex characters
      ... i have an array of chars like 0x81,0x7e,0xff etc, ... when i try to display such characters using ...
      (comp.lang.java.programmer)