in reply to Re^2: Better way to perform "double split" ?
in thread Better way to perform "double split" ?
Well, thinking of it, you could of course also operate on substr($cmd_output,rindex($cmd_output,"\n")+1) which also would eliminate one split, but I admit that this doesn't look very elegant either. But if the format is always as shown in your example (in particular, the usage of white space), you could get the date by
(BTW, I believe that the m modifier can even be left out here - what do the experts say?).(split(/(\s|\n)/m,$cmd_output))[-3]
|
|---|