in reply to Re^3: Adding the duplicate data using arrays
in thread Adding the duplicate data using arrays

Ok..JavaFan. If i have the data "Apple banana 100" if i split on the basis of "\s+" it will split Apple and Banana...so how can i split in such a way that "Apple Banana " is the key and "100" is the value...give me some wisdom

  • Comment on Re^4: Adding the duplicate data using arrays

Replies are listed 'Best First'.
Re^5: Adding the duplicate data using arrays
by JavaFan (Canon) on Aug 11, 2010 at 10:48 UTC
    my ($fruit, $value) = "Apple banana 100" =~ /^(.*\S)\s+([0-9]+)/;