Oops! $ perl -e ' @z = qw( 3d20m 5d2h 2h2s ); for $v (@z){ $v =~ s/d/*24*3600 +/; $v =~ s/h/*3600 +/; $v =~ s/m/*60 +/; $v =~ s/s/ +/; chop $v; $k = eval $v; print "$v = $k seconds"; print "\n"; }' 3*24*3600 +20*60 = 260400 seconds 5*24*3600 +2*3600 = 439200 seconds 2*3600 +2 = 7202 seconds
But still, there has to be a way to compact this further. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]