Is there a better way to extract the date from the table?
How about:
use strict; use warnings; use 5.010; my $str = 'Timestamp 10.72.218.82:cpu_busy ---------------------------------- 2009-11-05 17:59:52 1.501 '; my ($date) = $str =~ /(^\d{4}-\d{2}-\d{2})/m; say "-->$date<--"; --output:-- -->2009-11-05<--
In reply to Re: Better way to perform "double split" ?
by 7stud
in thread Better way to perform "double split" ?
by perlpal
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |