#!/usr/bin/perl -w use strict; # get the filename (/tmp/xxx) my $file = shift; # open a log file open(LOG, ">>$ENV{HOME}/helper.log") or die "Oops : $!\n"; print LOG "Got file $file\n"; # open the file downloaded by mozilla if( not open(FILE, "<$file") ) { print LOG "Error opening file $file\n"; close LOG; exit 1; } # read the whole file undef $/; my $content = ; print LOG "Content {\n$content\n}\n"; close FILE; close LOG;