Leser: 5
8 Einträge, 1 Seite |
1
2
3
4
5
use lib "N:/wntapp/perl/perl583/lib";
use strict;
use warnings;
use File::Copy;
copy ("o:/monique/faq.dat", "d:/faq.dat");
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
--schnipp
sub copyfile
{
my $self = shift;
my $src = $_[0];
my $param = $_[1];
my $dest = "left";
my $file = undef;
my @data = undef;
my $srcfile = "";
my $destfile = "";
if (defined($param))
{
@data &
nbsp; = @{$param};
}
if ($src eq "left")
{
$dest = "right";
}
foreach $file (@data)
{
$srcfile = $self->{$src."path"}.$file;
$destfile = $self->{$dest."path"}.$file;
if (defined($self->{$src."ftp"}))
{
if (defined($self->{$dest."ftp"}))
{ # ftp -> copy;
$self->{$src."ftp"}->get ($srcfile, "c:/temp/".$file );
$self->{$dest."ftp"}->put ("c:/temp/".$file, $destfile );
unlink "c:/temp/".$file; &nb
sp;
} else { # ftp -> get;
$self->{$src."ftp"}->get($srcfile, $destfile );
}
} else {
if (defined($self->{$dest."ftp"}))
{ # ftp -> put;
$self->{$dest."ftp"}->put($srcfile, $destfile);
} else { # copy;
copy ($srcfile, $destfile);
}
}
}
$self->reloaddir($src);
$self->reloaddir($dest);
}
schnapp--
QuoteTk::Error: Undefined subroutine &prj::cftpwindow::copy called at prj/cftpwindow.
pm line 378.
prj::cftpwindow::copyfile at prj/cftpwindow.pm line 378
prj::cftpwindow::event at prj/cftpwindow.pm line 396
prj::clist::call_event at prj/clist.pm line 230
prj::clist:: at prj/clist.pm line 115
[\&prj::clist::]
Tk callback for .frame1.frame.button
Tk:: at N:/wntapp/perl/perl583/site/lib/Tk.pm line 228
Tk::Button::butUp at N:/wntapp/perl/perl583/site/lib/Tk/Button.pm line 111
(command bound to event)
1
2
3
4
5
6
7
8
9
10
11
use strict;
use warnings;
use Tk;
use Tk::Dialog;
use Net::FTP;
use File::copy;
use prj::clist;
package prj::cftpwindow;
File::copy ($srcfile, $destfile);
1
2
3
4
5
6
7
8
9
10
11
use strict;
use warnings;
package prj::cftpwindow; # <<< verschoben nach hier
use Tk;
use Tk::Dialog;
use Net::FTP;
use File::copy;
use prj::clist;
8 Einträge, 1 Seite |