Here is a quick Perl script I wrote to monitor a folder for new files of a certain extension. When an .epl2 file is created, it is immediately printed on lp0.
#notify.pl
#!/usr/bin/perl -w
use strict;
use SGI::FAM;
use File::Copy; my $conn = new SGI::FAM;
$conn->monitor( “/home/bprenatt/” ); my $extension = “epl2″;
my $watch = “create”; while (1)
{
my $event = $conn->next_event;
my $len […]



