Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: re-syncing these subtitles

by jwkrahn (Abbot)
on Sep 05, 2010 at 23:53 UTC ( [id://858957]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    open my $fh, "<", $infile or die "error opening '$infile':$?";
    
  2. or download this
        if ( m/^(\d{2}:\d{2}:\d{2},\d+)\s\-\-\>\s(\d{2}:\d{2}:\d{2},\d+)/g
    + ) {
    
  3. or download this
        my @elems = split(':', $time);
        my $seconds = pop @elems;
        my $minutes = pop @elems;
        my $hours   = pop @elems;
    
  4. or download this
        my ( $hours, $minutes, $seconds ) = split /:/, $time;
    
  5. or download this
        # force to numerical
        $hours += 0; $minutes += 0; $seconds += 0;
    
  6. or download this
        my $seconds = sprintf( "%02.3f", ( ( $sectime - ( $hours * 3600 ) 
    +) - ( $minutes * 60 )) );
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://858957]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (5)
As of 2024-04-25 08:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found