#!/usr/bin/perl

use Net::FTP;
use strict;


my $ftp = Net::FTP->new("localhost", Debug => 1, Port => 4559)
	  or die "Cannot connect to some.host.name: $@";

my $wait = 0;

$ftp->login('aidan');

if (@ARGV[0] eq '-w')
{
	$wait = 1;
	shift @ARGV;
}

my $job = @ARGV[0];

$ftp->quot('JOB', $job);
$ftp->quot('JWAIT');
$ftp->quot('JPARM', 'state');

print "STATE: " . $ftp->message() . "\n";

$ftp->quit;
