Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation

Re: Re: Webcam 0.2

by peschkaj (Pilgrim)
on Aug 08, 2001 at 00:01 UTC ( #102890=note: print w/replies, xml ) Need Help??

in reply to Re: Webcam 0.2
in thread Webcam 0.2

Dayum, that's alot of code. I wrote a piece of cam-like software today. I have found a program that works astonishingly well (gqcam) on my linux box. The only problem being that it doesn't auto upload. So, I took it upon myself to write some code for it:
#!/usr/bin/perl -w use Net::FTP; my $hostname; my $username; my $password; my $boink; my $directory; my $filename; my $ftp; my $sleeptime; $boink = 0; while ($boink == 0) { $ftp = Net::FTP->new($hostname) or die "can't connect: $@\n"; $ftp->login($username,$password) or die "can't login: $@\n"; $ftp->cwd($directory) or die "can't cwd to $directory\n"; $ftp->type(binary) or die "cannot change type to binary\n"; $ftp->put($filename) or die "cannot put $filename\n"; $ftp->close; sleep($sleeptime); }
Althogh this is nothing revolutionary, I thought that I might as well post it because it runs under -w, as far as I am aware. I attempted to launch gqcam from the program with: `gqcam &`; but that generated error after error for the cam program. If anyone has any input on this, let me know.

Replies are listed 'Best First'.
Re: Re: Re: Webcam 0.2
by Beatnik (Parson) on Aug 08, 2001 at 00:28 UTC
    The huge amount of code is mostly for GD... the timestamp and footer stuff. I can compact it to a one-liner but then again... :))
    The whole purpose was to more or less mimick the Stamp app behaviour (which it kinda does).

    ... Quidquid perl dictum sit, altum viditur.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://102890]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (7)
As of 2018-05-26 17:22 GMT
Find Nodes?
    Voting Booth?