Can i get help from you please.#!/usr/local/bin/perl my $data = 'Sending 104 bytes *** POST /path HTTP/1.0^M Content-type: text/xml^M Content-length: 37^M ^M SENT 104 HEADER HTTP/1.1 401 Unauthorised^M Connection: Close^M Content-Length: 0^M ^M <?xml version="1.0" encoding="UTF-8"?> <?path?> '; my @splitdata = split(/\n{2,}/, $data); my $lastValue = pop @splitdata print"Last value => $lastValue\n"; Expected output: Last value=> '<?xml version="1.0" encoding="UTF-8"?> <?path?>'
In reply to how to split data by ^M^M by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |