in reply to Re: Re: When is an code^$/code not a code^$/code?
in thread When is an ^$ not a ^$ ?
0d is hex for \r, 0a is hex for \n. I made myself a testfile by: perl -e 'print "aa\r\nab\r\n\r\naa\nbb\n"' >test Than I tried to get items out from it by: perl -e '$/="\r\n\r\n"; print "\tMy item: $_" while (<>);' <test This gave me the following output:
So that seems to work. I don't see why this would work and the others not, so I tried another one: perl -e 'undef $/;@a=split(/\r\n\r\n/,<>); print join "\t My item: ", @a;' <test Which gave a similar result. There must be something special to your case.My item: aa ab My item: aa bb
Hope this helps a bit,
Jeroen
"We are not alone"(FZ)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: Re: When is an code^$/code not a code^$/code?
by Clownburner (Monk) on Apr 05, 2001 at 21:47 UTC | |
by jeroenes (Priest) on Apr 06, 2001 at 00:02 UTC |