2 minutes and 8 second (how do i convert it to 02:08)??

2009-06-11 Thread Michael Alipio
Hi, I have a program that computes the number of elapsed minutes and seconds. if the outputs are: 2 minutes, and 8 seconds. How do I print those two values to look like Elapsed time: 02:08 Thanks! -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands,

Re: 2 minutes and 8 second (how do i convert it to 02:08)??

2009-06-11 Thread Rob Coops
On Thu, Jun 11, 2009 at 10:51 AM, Michael Alipio daem0n...@yahoo.comwrote: Hi, I have a program that computes the number of elapsed minutes and seconds. if the outputs are: 2 minutes, and 8 seconds. How do I print those two values to look like Elapsed time: 02:08 Thanks! -- To

Re: 2 minutes and 8 second (how do i convert it to 02:08)??

2009-06-11 Thread Jim Gibson
On 6/11/09 Thu Jun 11, 2009 1:51 AM, Michael Alipio daem0n...@yahoo.com scribbled: Hi, I have a program that computes the number of elapsed minutes and seconds. if the outputs are: 2 minutes, and 8 seconds. How do I print those two values to look like Elapsed time: 02:08 This

Re: 2 minutes and 8 second (how do i convert it to 02:08)??

2009-06-11 Thread Gunnar Hjalmarsson
Rob Coops wrote: $text = 2 minutes, and 8 seconds; $text =~ /(\d{1,2}).*?(\d{1,2}).*/; -^^ When you are extracting stuff, .* is _always_ redundant in the beginning or end of a regex. -- Gunnar Hjalmarsson Email: http://www.gunnar.cc/cgi-bin/contact.pl -- To