或者用正则捕捉复制代码
- my ($a, $b, $c) = (split( /[ :]/, "INDEX 00 04:00:65" ))[-3,-2,-1];
- $a * $e1 + $b * $e2 + $c * $e3
复制代码
- my ($a, $b, $c) = ("INDEX 00 04:00:65" =~ /(\d+):(\d+):(\d+)/)
- $a * $e1 + $b * $e2 + $c * $e3
欢迎光临 批处理之家 (http://www.bathome.net/) | Powered by Discuz! 7.2 |