in reply to Re: Re: When is an code^$/code not a code^$/code?
in thread When is an ^$ not a ^$ ?

I'm pretty baffled that all these things don't work. Can you put your problem files online maybe?

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:

My item: aa ab My item: aa bb
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.

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
    I'll try to recreate a file that has this problem that I can post; right now the files I'm working on are part of a security audit so the data can't really be posted.

    It is really weird though - the Hex editor confirms that there's nothing there but a bunch of \r\n's, and yet I can't split on \r\n. Funkadelic.

    BTW, this is under Perl 5.005_03, you don't suppose there might be a bug or something?


    Signature void where prohibited by law.
      I just tested the same code at home, on Macperl patchlevel 5.004. Works like a charm.

      Definitely something strange.

      Jeroen
      "We are not alone"(FZ)