in reply to How do i extract 3 variables from each line in a file, and print them to a new file

If you just want the last 3 numbers in a line you can use a regular expression:
my $line = "3434 34456... 321ms:543ms:45ms"; if ( $line =~ m/(\d+)\D+(\d+)\D+(\d+)\D+$/ ) { print( "$1,$2,$3\n" ); }
  • Comment on Re: How do i extract 3 variables from each line in a file, and print them to a new file
  • Download Code