mr_evans2u has asked for the wisdom of the Perl Monks concerning the following question:
sub sieve_util_set_flagfile { my($relay_dir,$home_dir,$filename,@lock) = @_; my $filelock; foreach my $filelock (@lock) { if (my $ftp = Net::FTP->new($filelock)) { #die "Cannot login: $@ "unless $ftp; # Log into the server $ftp->login ("$uid", "$pass"); # Change to the right directory $ftp->cwd ("$relay_dir"); # Change to binary transfer mode $ftp->binary; @check_dir = $ftp->ls($relay_dir); if ($ftp->put($filename,$flag_file)) { $ftp->quit; } else { sieve_util_generic_error ("Unable to put $flag_file in $relay +_dir. The file is not locked from other users."); } } else { next; } }#end foreach return ($uid,$pass,$filelock); }
sub sieve_util_remove_page { my $relay_label; my ($relay, $filename, $int_ext,$filelock) = @_; if ($int_ext =~ /^int/i) { $relay_label = "Internal Relay: $filelock"; } else { $relay_label = "External Relay: $filelock"; } print start_html(-title=>"Sieve Filter Administration",), "<div align=\"center\">\n", br(br(br(h2(b("Removed!"))))), h3(b("The file lock on $filelock has been removed!")), hidden(-name=>"tflag", -default=>"$int_ext"); print end_html(); exit; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: passing variable problem
by Abigail-II (Bishop) on Oct 14, 2003 at 22:43 UTC | |
|
Re: passing variable problem
by dragonchild (Archbishop) on Oct 15, 2003 at 15:57 UTC |