#!/usr/bin/perl use warnings; use strict; use IO::Socket; my $data; open OUT, ">file.avi"; my $local = new IO::Socket::INET->new(LocalPort=>10000, Proto=>'udp'); while(1) { $local->recv($data,1024); print OUT "$data"; }