Sponsored Content
Top Forums Shell Programming and Scripting Same time ftp download in perl multiple sites. Post 302277467 by Rhije on Friday 16th of January 2009 11:05:41 AM
Old 01-16-2009
hrm, I'm not really sure. I am not the biggest perl guru, so that is why I suggested the background method.
 

9 More Discussions You Might Find Interesting

1. SuSE

When a FTP download is completed

I receive files by FTP in an input directory. Every 10 seconds a process checks if some new file has arrived to the input directory and then the process moves them to another directory to be read by a second process. The problem is that there is no way to know if the download has finished... (11 Replies)
Discussion started by: Javi
11 Replies

2. HP-UX

Ftp Download Problem

FROM WINDOWS , WHILE GETTING DATA FROM HP-UNIX SERVER USING FTP, I AM ABLE TO GET DATA ONLY LESS THAN 4GB FILE, PLZ HELP ME HOW TO GET MORE MORE THAN 4GB FILE. (4 Replies)
Discussion started by: niranjan
4 Replies

3. Shell Programming and Scripting

Corrupted Download with Net::FTP (perl)

Hello, I am trying to download several files from a remote FTP server using Net::FTP from within a perl script. The files download alright, except they appear to be corrupted. I know this because once after downloading, I use bzcat to pipe the files to a split command, and bzcat complains saying... (3 Replies)
Discussion started by: amcrisan
3 Replies

4. Shell Programming and Scripting

ftp multiple files at the same time

Hi All, I am using ncftpput in one of my c-shell script to upload files to a remote location. The source files keep coming continuosly and to upload each file ncftpput opens a new connection everytime. It means ncftp uploads the file1 than file2 than file3 .... There is gap 20-25 secs between... (10 Replies)
Discussion started by: sraj142
10 Replies

5. Shell Programming and Scripting

Please suggest the Sites for perl script beginners for better understanding

I am begginer to perl scripting, i like to learn all the functionality of the perl scrpting , Could you please help me on this :confused::confused: (2 Replies)
Discussion started by: jothi basu
2 Replies

6. Programming

Multiple sites running off same code

I m interested in making multiple websites, all with the same basic functionality but will have different designs or templates. is there a way they can all run off the same basic underlying code, but use different templates. what is the best method of doing this. (1 Reply)
Discussion started by: AimyThomas
1 Replies

7. Shell Programming and Scripting

Ftp multiple files one at a time

Hi, I have a problem while ftp'ing zip files one after the other from linux source directory to a ftp host machine. here is the shell script: #!/bin/ksh dir=data/dir1/dir2 # this dir is linux source directory where zip files located. rmtdir='/home/' echo $dir for i in /$dir/*; do if ;... (7 Replies)
Discussion started by: raj78
7 Replies

8. Shell Programming and Scripting

FTP download using perl script

Need assistance I have a script which i can download the files from ftp server using perl . But i want to download multiple files at a time #!/usr/bin/perl -w use Net::FTP; $ftp = Net::FTP->new("ftp.ncdc.noaa.gov"); $ftp->login('username', 'password'); $ftp->cwd("<dir>");... (9 Replies)
Discussion started by: ajayram_arya
9 Replies

9. Shell Programming and Scripting

Read latest file name with a date and time and then download from FTP

Hi All, Please help. I have requirement to read the file / folder based on the latest date and download the file and folder. There will be files and folders in the location like 20140630-144422 20140630-144422.csv 20140707-182653 20140707-182653.csv 20140710-183153... (7 Replies)
Discussion started by: Praveen Pandit
7 Replies
Error(3pm)						User Contributed Perl Documentation						Error(3pm)

NAME
Tk::Error - Method invoked to process background errors SYNOPSIS
Customization: require Tk::ErrorDialog; or sub Tk::Error { my ($widget,$error,@locations) = @_; ... } DESCRIPTION
The Tk::Error method is invoked by perl/Tk when a background error occurs. Two possible implementations are provided in the distribution and individual applications or users can (re)define a Tk::Error method (e.g. as a perl sub) if they wish to handle background errors in some other manner. A background error is one that occurs in a command that didn't originate with the application. For example, if an error occurs while executing a callback specified with a bind or a after command, then it is a background error. For a non-background error, the error can simply be returned up through nested subroutines until it reaches the top-level code in the application; then the application can report the error in whatever way it wishes. When a background error occurs, the unwinding ends in the Tk library and there is no obvious way for Tk to report the error. When Tk detects a background error, it saves information about the error and invokes the Tk::Error method later when Tk is idle. Tk::Error is invoked by perl/Tk as if by the perl code: $mainwindow->Tk::Error("error message", location ...); $mainwindow is the MainWindow associated with widget which detected the error, "error message" is a string describing the error that has been detected, location is a list of one or more "locations" which describe the call sequence at the point the error was detected. The locations are a typically a mixture of perl location reports giving script name and line number, and simple strings describing locations in core Tk or perl/Tk C code. Tk will ignore any result returned by the Tk::Error method. If another error occurs within the Tk::Error method (for example if it calls die) then Tk reports this error itself by writing a message to stderr (this is to avoid infinite loops due to any bugs in Tk::Error). If several background errors accumulate before Tk::Error is invoked to process them, Tk::Error will be invoked once for each error, in the order they occurred. However, if Tk::Error calls Tk->break, then any remaining errors are skipped without calling Tk::Error. The Tk module includes a default Tk::Error subroutine that simply reports the error on stderr. Tk::ErrorDialog An alternate definition is provided via: "require Tk::ErrorDialog;" that posts a dialog box containing the error message and offers the user a chance to see a stack trace showing where the error occurred. This is an OO implementation of the Tcl/Tk command bgerror, with a twist: since there is only one ErrorDialog widget, you aren't required to invoke the constructor to create it; it will be created automatically when the first background error occurs. However, in order to configure the -cleanupcode and -appendtraceback ErrorDialog options you must call the constructor and create it manually. The ErrorDialog object essentially consists of two subwidgets: a Dialog widget to display the background error and a Text widget for the traceback information. If required, you can invoke various widget methods to customize these subwidgets - their advertised names are described below. $mw->ErrorDialog(-cleanupcode => code, -appendtraceback => bool); $mw is a window reference. code is a CODE reference if special post-background error processing is required (default is undefined). The callback subroutine is called with @_ having the same arguments that Tk::Error was invoked with. bool is a boolean indicating whether or not to append successive tracebacks (default is 1, do append). Advertised ErrorDialog widgets error_dialog is the Dialog widget reference. text is the Text widget reference containing the traceback information. BUGS
If after or fileevent are not invoked as methods of a widget then perl/Tk is unable to provide a $mainwindow argument. To support such code from earlier versions of perl/Tk perl/Tk therefore calls Tk::Error with string 'Tk' instead: Tk->Tk::Error(...). In this case the Tk::Error in Tk::ErrorDialog and similar implementations cannot "popup" a window as they don't know which display to use. A mechanism to supply the MainWindow in applications which only have one (a very common case) should be provided. SEE ALSO
Tk::bind Tk::after Tk::fileevent KEYWORDS
background error, reporting perl v5.14.2 2010-05-29 Error(3pm)
All times are GMT -4. The time now is 05:00 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy