in reply to scalar number with preceding 0.
#!/usr/bin/perl use strict; use warnings; while ( <DATA> ) { chomp; print format_time( split " " , $_ ), "\n"; } sub format_time { return sprintf("%.2d:%.2d:%.2d", @_) } __DATA__ 9 12 54 23 8 7
Cheers - L~R
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: scalar number with preceding 0.
by PerlingTheUK (Hermit) on Jul 26, 2004 at 16:54 UTC | |
by Limbic~Region (Chancellor) on Jul 26, 2004 at 16:59 UTC | |
by PerlingTheUK (Hermit) on Jul 26, 2004 at 17:10 UTC | |
by Limbic~Region (Chancellor) on Jul 26, 2004 at 17:25 UTC |