Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

does Net:::FTP support 'quote'?

by mifflin (Curate)
on Aug 03, 2004 at 18:18 UTC ( [id://379772]=perlquestion: print w/replies, xml ) Need Help??

mifflin has asked for the wisdom of the Perl Monks concerning the following question:

I have a ksh script that uses ftp. One of the commands that is sent is:
quote site filetype=jes
My question is, how would I send this command using Net::FTP?
I looked and the perldocs and there seem to be two possible candidates, quot and site. Does anyone have any insight as to which of these ( or maybe another ) would work?

Replies are listed 'Best First'.
Re: does Net:::FTP support 'quote'?
by Limbic~Region (Chancellor) on Aug 03, 2004 at 18:23 UTC
    mifflin,
    After re-reading your question, it looks like you need the TIAS approach. Since TFM, shows both, my guess is that the KSH script used quote because site wasn't available. If both work, go with the one that makes the most sense to you.

    Cheers - L~R

    Update: Removed excerpt from the doc since mifflin had already read it
      Yes, I saw that and the site sub in the perldocs
      site (ARGS) Send a SITE command to the remote server and wait for a response. Returns most significant digit of the response code.
      I was wondering what the difference was.
      We use the same syntax here: quote site file=jes and it would seem we only use the quote as the site is not available in the ftp client we use (the standard windows ftp client). Therefore the site method should work.
Re: does Net:::FTP support 'quote'?
by Mr. Muskrat (Canon) on Aug 04, 2004 at 00:56 UTC

    In the Net::FTP docs, site is listed under methods because its use is supported. quot is listed under "methods for the adventurous" because well, it can be troublesome...

    My copy of the Net::FTP docs says:
    "WARNING This call should only be used on commands that do not require data connections. Misuse of this method can hang the connection."

    Both methods use Net::Cmd's command method to do the dirty work. site uses it to send the FTP SITE command followed by the quoted command as the arguments. quot uses it to send the quoted command as is.

    Disclaimer: I have studied the code of this module extensively over the past six months. I briefly reviewed the code today to verify my beliefs but it's been a long day and I may have inadvertantly misstated something here.

Re: does Net:::FTP support 'quote'?
by nimdokk (Vicar) on Oct 05, 2005 at 14:33 UTC
    I must have read this once upon a time since I've already upvoted it. Wish I could do so again because it just came in handy. Thanks to Super Search :-) ++

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://379772]
Approved by kvale
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (3)
As of 2024-04-26 04:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found