in reply to how to split data by ^M^M

my @splitdata = split(/\^M/, $data); my $lastValue = pop @splitdata; print"Last value => $lastValue\n";

prints

Last value => <?xml version="1.0" encoding="UTF-8"?> <?path?>

Just a something something...

Replies are listed 'Best First'.
Re^2: how to split data by ^M^M
by Anonymous Monk on Jul 09, 2009 at 13:56 UTC
    It works well on windows box. In my linux box it is not working.please help.

      I am on linux, works fine for me...
      can you give us more details (OS, perl version, more example code and output, any error messages you are getting in your linux machine, maybe dump out your @splitdata with Data::Dumper?).
      Also check out comments by moritz below...

      Just a something something...