develooper Front page | perl.beginners | Postings from May 2008

sed split on pipe

Thread Previous | Thread Next
From:
Jack Butchie
Date:
May 6, 2008 04:27
Subject:
sed split on pipe
Have been googling for some time now and every command I tried fails.  I 
want to use sed from the command line or use it in a windows batch file to 
split on a pipe delimited file, windows server. The examples  have \n as the 
carriage return code, but all that happens is the pipe is replaced by the 
letter n.

the file has a space between each line

CALL|TITLE|URL LINK|

CALL|TITLE|URL|LINK
----- Original Message ----- 
From: "Chas. Owens" <chas.owens@gmail.com>
To: "Dr.Ruud" <rvtol+news@isolution.nl>
Cc: <beginners@perl.org>
Sent: Sunday, May 04, 2008 5:00 PM
Subject: Re: another help on input record separator clarity please


> On May 4, 2008, at 17:01, Dr.Ruud wrote:
> snip
>>> Ah-ha, perlre is wrong then. It claims that space is 'A GNU extension
>>> equivalent to [ \t] , "all horizontal whitespace"', but that must  only
>>> be true under the bytes pragma.
>>
>> s/claims that space is/claims that blank is/
>>
>> Be careful with using the byte pragma in that way, because it modifies
>> the behaviour of strings that have the utf8 flag on, which means you  are
>> depending on the internal way that your perl executable implements
>> strings, IOW asking for trouble.
> snip
>
> Geeze, that is the second time I have misread things.  I obviously  need 
> more sleep.
>
> snip
>>> It's perlbug time.
>>
>> There are many voices that want to change the meaning of \d to [0-9]
>> only (from Perl 5.12 on).
>>
>> Maybe we should get a \pd to be a shortcut for \p{IsDigit}. (idem  for D,
>> s, S, w, W, etc.)
> snip
>
> I was referring to what I thought was an error in the docs, not an  issue 
> with what it matched; however, I do have an issue with \d.  It  makes 
> dealing with numbers you can do math with a pain in the tuckus  ([0-9] vs 
> \d).
>
> --
> Chas. Owens
> wonkden.net
> The most important skill a programmer can have is the ability to read.
>
>
> -- 
> To unsubscribe, e-mail: beginners-unsubscribe@perl.org
> For additional commands, e-mail: beginners-help@perl.org
> http://learn.perl.org/
>
> 


Thread Previous | Thread Next


Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About