Solved

how to FTP using MacPerl or From Win95?

Posted on 1998-10-21
15
212 Views
Last Modified: 2010-03-05
Hi, I would like to know how to FTP either using MacPerl or Win95 platform.  I tried with ftp.pl but with no success. Please Help. Thanks.
0
Comment
Question by:sunghkim
  • 9
  • 6
15 Comments
 
LVL 5

Accepted Solution

by:
b2pi earned 150 total points
ID: 1205581
I've no idea about MacPerl, but on windows 95, you can do the following:

1.) from the command line execute perl
2.) Type the following

use Net::FTP;

3.) Press Control-C to get out
4.) If step 2 produced a bunch of text like:
Can't locate Net/FTP.pm in @INC (@INC contains: .....)

then download Net::FTP from http://www.perl.com/CPAN-local/modules/by-module/Net/libnet-1.0605.tar.gz

and then install it.

5.) Look at the documentation.  As a start,

use Net::FTP;

$ftp = Net::FTP->new("some.host.name");
$ftp->login("anonymous","me@here.there");
$ftp->cwd("/pub");
$ftp->get("that.file");
$ftp->quit;

transfers a file 'that.file' from ftp://some.host.name/pub

0
 

Author Comment

by:sunghkim
ID: 1205582
I just decompressed libnet. what else should i do? i put the files to Net folder and i tried to run your sample program but it saids "can't locate Net/Config.pm in @INC at perl/lib/net/FTP.pm.  

Thanks.
0
 
LVL 5

Expert Comment

by:b2pi
ID: 1205583
Did you read the README file?

Take the files out of the folder where they are. Since you're on
Win95, uncompress libnet-1.0605.tar.gz into the /tmp directory. cd to
the directory where the files actually are.  Read the README file.
Read any other pertinent documents. As they'll tell you, type in (the
name of your make may differ, but if you're using VC++, it's nmake):

perl Makefile.PL
nmake
nmake test
nmake install


0
Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

 

Author Comment

by:sunghkim
ID: 1205584
I did perl Makefile.PL and I think it is installed correctly. but when i try to run that sample program, it says "Global symbol "%NetConfig" requires explicit package name at C:\perl\lib/Net/FTP.pm line 57.

what 's that mean?

Thanks for your help b2pi.
0
 
LVL 5

Expert Comment

by:b2pi
ID: 1205585
You have to follow the above steps explicitly (well, there are
shortcuts you can take, but don't)

1.) unpack libnet to a temp directory
2.) go to the temp directory
3.) run

    perl Makefile.PL

4.) run

    nmake

5.) run

    nmake test

6.) run

    nmake install




0
 

Author Comment

by:sunghkim
ID: 1205586
I did perl Makefile.PL and I think it is installed correctly. but when i try to run that sample program, it says "Global symbol "%NetConfig" requires explicit package name at C:\perl\lib/Net/FTP.pm line 57.

what 's that mean?

Thanks for your help b2pi.
0
 

Author Comment

by:sunghkim
ID: 1205587
there is no nmake.
after perl makefile.pl, it creates "makefile" file and i can't find any file called nmake.
0
 
LVL 5

Expert Comment

by:b2pi
ID: 1205588
You don't have a compiler?
0
 

Author Comment

by:sunghkim
ID: 1205589
no compiler. is there another way?
0
 
LVL 5

Expert Comment

by:b2pi
ID: 1205590
1.) Do you own the machine (i.e. can you install a new perl?)
2.) Which version of perl do you currently have?
0
 

Author Comment

by:sunghkim
ID: 1205591
no compiler. is there another way?
0
 

Author Comment

by:sunghkim
ID: 1205592
i have version 5.005_02 built for MSWin32-x86-object. Is there a version that already have libnet installed?
Thanks for the help.
0
 
LVL 5

Expert Comment

by:b2pi
ID: 1205593
This is activestate?  There's supposed to be some magical way to download modules directly for activestate, but I don't know what it is.  The standard binary distribution (the GURU version) comes with libnet.
0
 

Author Comment

by:sunghkim
ID: 1205594
where can i get it? can you give me the link?
thanks a lot.
0
 

Author Comment

by:sunghkim
ID: 1205595
thanks.
I found it and i tried it and it works!!!
thanks a lot.

0

Featured Post

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Perl output collect 7 67
use google analytics code in perl script 2 76
Get a Perl script to return content from a module 7 79
create a gui in perl 3 87
On Microsoft Windows, if  when you click or type the name of a .pl file, you get an error "is not recognized as an internal or external command, operable program or batch file", then this means you do not have the .pl file extension associated with …
A year or so back I was asked to have a play with MongoDB; within half an hour I had downloaded (http://www.mongodb.org/downloads),  installed and started the daemon, and had a console window open. After an hour or two of playing at the command …
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

785 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question