my $content = <_DATA_> #which i extract from a file, so I would give the file handle my $out = $content =~ m/ "latestTime": (.*) , /; print $out;