Re: Limit on "fmt" buffer size? Loose much of long line.

From: Fred Ma (fma_at_doe.carleton.ca)
Date: 09/15/04

  • Next message: John D Groenveld: "Re: ANN: New UNIX programming book"
    Date: 15 Sep 2004 16:46:19 GMT
    
    

    rc wrote:
    >
    > Hmm, i've forgot about the double spaces. In the example i've sent
    > you, i've put $/=" ", which means that the input record separator is
    > one space. Unfortunately, you cant use a regex for this, so you cant
    > say $/=" +" to split on one or more spaces. As "perldoc perlvar"
    > states:
    >
    > Remember: the value of "$/" is a string, not a
    > regex. awk has to be better for something. :-)
    >
    > So, you can change it to " ", but the it won't wrap the other lines,
    > but maybe that's not a problem for you.

    Thanks for clearing that up. I actually wasn't all that bent on
    learning enough perl right away to understand the script (thesis
    defense in less than 24 hours puts a few other priorities ahead).
    As I said, though, such time invested is invaluable in the long
    term. For now, I'll stick with the awk. Thanks.

    Fred


  • Next message: John D Groenveld: "Re: ANN: New UNIX programming book"

    Relevant Pages

    • Re: Limit on "fmt" buffer size? Loose much of long line.
      ... > Hi, Christian, ... > to put in some empty lines too. ... Unfortunately, you cant use a regex for this, so you cant ...
      (comp.unix.programmer)
    • Re: Regex Issues - Finding Qualified URLS
      ... sorta new to regex, but there is a group in regexp I think... ... how that above masks out links to same page but... ...
      (microsoft.public.dotnet.languages.csharp)
    • regex: remove file ext
      ... seems like it should be easy but i cant get the regex to work. ... / the regex is ".\w$" a dot followed by a word at the end of the str ...
      (comp.lang.java.programmer)
    • Re: More Regex
      ... I cant figure out what it does. ... is a greedy quantifier is it not ... So the regex above matches all src=", that are not followed by http://. ...
      (comp.lang.php)
    • Re: Suspect DLL files missing.
      ... Hmm, now I cant find the GinaDLL in the registry and I can't even do sfc ... > Description of Windows XP and Windows Server 2003 System File Checker ...
      (microsoft.public.windowsxp.help_and_support)