Come for the quick hacks, stay for the epiphanies. | |
PerlMonks |
Re: re-syncing these subtitlesby jwkrahn (Abbot) |
on Sep 05, 2010 at 23:53 UTC ( [id://858957]=note: print w/replies, xml ) | Need Help?? |
The $? variable is not relevant in this context. You should be using either $! or $^E.
You are using the /g global option in a scalar context, which would make sense in a while loop, but the value of $_ changes each time you test it so it makes no sense to use it there.
Why not just:
An unnecessary step as the numbers are already numerical.
The number before the period in the format string for floating point is the total width. So if you want the result to look like '12.345' then you need a format string of '%06.3f' because it has a total width of six characters.
In Section
Cool Uses for Perl
|
|