Hi All,
        I am working a project that captures images from "web cams" and
turns them into an AVI so that you can record things that happen in a
different time zone.

I am almost done except for the PERL script that lets you set the timer and
spawns the recording processes.

My problem is that I am trying to use Date::Manip to get user input and then
convert it to seconds since 1970. When I try to use the
&Date_SecsSince1970() subroutine the program hangs.

Thanks,
Chris



#!/usr/bin/perl -w

use Date::Manip;
#use Time::Ctime;
&Date_Init();

sub period_begin
{
  local @answer;
  local $default;
  local $helpmsg = "\nThis sets the beginning of potential the recording
period;\n la
ter you will specify which times within this period the program should
actually\n be
recording or specify random times\nUse: MM DD YYYY HH MM SS\n";
  #$default = &UnixDate("today","%M %D %Y %H %M %S");
  #$default = time();
        $tm=time();
  $default=&UnixDate("today","%m %d %Y %H %M %S");
  @default=split(/\s/, $default);
  until ($period_begin)
  {
        print "Start date/time of recording session[@default]:";
        @answer = <STDIN>;
        #chop $answer[0];

        if (@answer eq "")
        {
           @answer = @default;
           $period_begin=&Date_SecsSince1970(@answer);
        }
        elsif (@answer[0] eq "?")
        {
           print $helpmsg;
        }
        else
        {
        #$period_begin = &ParseDateString($answer);
        $period_begin=&Date_SecsSince1970(@answer);
        }
 }

  print "Recording Period Begin: $period_begin\n";
}

&period_begin;

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to