I think a regex makes more sense in this case. Yours can be cleaned up a bit though.
my ($dd,$hh,$mm,$ss) = /^(?:(\d\d)-)?(?:(\d\d):)?(\d\d):(\d\d)$/;
-sauoq "My two cents aren't worth a dime.";
In reply to Re: parsing etime field from solaris ps
by sauoq
in thread parsing etime field from solaris ps
by greenFox
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |