#!/usr/bin/perl my $teststring = " File length: 0m 04.0s Elapsed time: 0m 00.0s Rate: 124.9479 Average bitrate: 22.3 kb/s"; $teststring =~ /^\s*File\s+length:\s*([0-9.]+)m\s+([0-9.]+)s\s*$/; print "\n $1 $2 \n";