Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Understanding a tftp module

Status
Not open for further replies.

mhbroon

Technical User
Mar 16, 2004
5
GB
A question which is probably just due to my first use of a perl module.

I have already downloaded TFTP-1.0b3 from CPAN, (i am on a windows platform currently). Looking at the description etc has left me a little bemused in how to use it.
I have some existing code which discovers ip addresses off a radio network, but now using those ip's i want to tftp some performance files off the individual ne's to a specific file location.
Under description is shows below:
use TFTP;

$tftp = new TFTP ("some.host.name");
$tftp->get ("that.file");
$tftp->octet;
$tftp->put ("this.file");
$tftp->quit;

I have a small level of confusion, as i understand what this all means, but under a heading constructor, it shows:

new (HOST[,OPTIONS])

tying myself in knots, with why it would show ("some.host.name") and then show me something different in the constructor.
I am still in the process of learning perl and this is my first use of .pm from CPAN, so excuse my ignorance.
Any useful comments will be appreciated
Thanks in advance
mhb
 
I do not understand your confusion, all 'HOST' means is 'put your host here'.

The example does that with "some.host.name"

Its just two different ways of representing the same thing.

Pretty common UNIX/C representation of a constructor.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top