RABBIT 45 -126.06686
my output should be like 1)RABBIT 2)45 3)-126.06686
I am not able to get -126.06686. Thank you.#!usr/bin/perl use strict; use warnings; my $string="RABBIT 45 -126.06686"; (my $temp1)=$string=~ /^(\w+)\s+/; (my $temp2)=$string=~ /^\s+/(\d+)/; (my $temp3)=$string=~ /^(.*)\s+(\d+)\s+$/;
In reply to Pattern match and splitting of that by Nansh
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |