Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: re-syncing these subtitles

by jwkrahn (Monsignor)
on Sep 05, 2010 at 23:53 UTC ( #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
Node Status?
node history
Node Type: note [id://858957]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (6)
As of 2021-06-24 11:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What does the "s" stand for in "perls"? (Whence perls)












    Results (127 votes). Check out past polls.

    Notices?