Perl/Tk question
Results 1 to 4 of 4

Thread: Perl/Tk question

  1. #1
    Senior Member
    Join Date
    Nov 2001
    Posts
    4,786

    Perl/Tk question

    I need to make a program in perl to be user initiated. Well I could make it in anything but I want to do it using perl/Tk

    Im making it where it requires the user to enter the name into box (so they feel responsible) then compress and transfer the contents of a directory by ftp. this part is easy.

    Here’s the problem. They want me to put a progress bar on it so the person waiting for the transfer to complete (to go home) will not think the program is stuck and just leave. Some of the files are 20 - 30Mb and can take some time.

    The progress bar itself is no problem but I cant seem to find out how to read the header for the total file size then count the bytes sent and put that count into a scalar. Any body have any thoughts on this?
    Bukhari:V3B48N826 “The Prophet said, ‘Isn’t the witness of a woman equal to half of that of a man?’ The women said, ‘Yes.’ He said, ‘This is because of the deficiency of a woman’s mind.’”

  2. #2
    Senior Member tampabay420's Avatar
    Join Date
    Aug 2002
    Posts
    953
    getting filesize is easy...
    Code:
    $size=(stat($file))[7]; #in bytes
    as for the other part, are you using the Net::FTP module? and would prolly have to modify that- but then you would also need to ship the FTP module as well as your script...
    yeah, I\'m gonna need that by friday...

  3. #3
    Senior Member
    Join Date
    Nov 2001
    Posts
    4,786
    whatever i modify will ship. im packaging via perl2exe. but i guess its back to the drawing board....thanks!
    Bukhari:V3B48N826 “The Prophet said, ‘Isn’t the witness of a woman equal to half of that of a man?’ The women said, ‘Yes.’ He said, ‘This is because of the deficiency of a woman’s mind.’”

  4. #4
    Jaded Network Admin nebulus200's Avatar
    Join Date
    Jun 2002
    Posts
    1,356
    This may be a silly question, but why not just turn the hash function on before you send the file?

    /nebulus
    There is only one constant, one universal, it is the only real truth: causality. Action. Reaction. Cause and effect...There is no escape from it, we are forever slaves to it. Our only hope, our only peace is to understand it, to understand the 'why'. 'Why' is what separates us from them, you from me. 'Why' is the only real social power, without it you are powerless.

    (Merovingian - Matrix Reloaded)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •