Help for this page

Select Code to Download


  1. or download this
    my $str="1 2 3 4 590";
    my ($a,$b)=split(/ ([^ ]+)$/, $str);
    print "a=$a\nb=$b\n";
    
  2. or download this
     
    my $str="1:2:3:4:590";
    my ($a,$b)=split(/:([^:]+)$/, $str);
    print "a=$a\nb=$b\n";