Net::FTP wie mach ich das mit den modulen

Post Reply
Message
Author
srtwist
Posts: 11
Joined: 20. May 2001 11:28

Net::FTP wie mach ich das mit den modulen

#1 Post by srtwist »

hi, ich habe mich rangesetzt und meine ersten versuche mit perl gemacht aber ich verstehe nicht wie man das mit den modulen machent brauche ich dazu perl5?

also das ganz läuft auf nem SuSE Linux7.0 Rechner und das script um das es geht sieht bisher so aus

#!/usr/bin/perl

###########################################
#Auslesen der IP des Ippp0(Isdn) Devices!!#
###########################################

$interface = "ippp0";
$shb = `/sbin/ifconfig $interface`;
@zeilen = split(/
/,$shb);
foreach $zeile (@zeilen) {
if ($zeile =~ /inet addr:([^ ]+)/) {
$ip = $1;
}
}
########################################
# print "$ip
";### ausgabe original!!!#
########################################

#######################################
# SCHREIBEN in die Datei index.html #
#######################################


open(SCHREIBEN,"> index.html");
print SCHREIBEN "<html>
";
print SCHREIBEN "<head>
";
print SCHREIBEN "<title>TERRABYTE</title>
";
print SCHREIBEN "<META content=\"text/html";
print SCHREIBEN "<META name\=\"Keywords\" content\=Cracks, Hacks,Linux>
";
print SCHREIBEN "</head>
";
print SCHREIBEN "<body bgcolor\=\"#0000000\" text\=\"#cccccc\">
";
print SCHREIBEN "<h1><p align\=\"center\">Weiterleitung zu Terrabyte</p></h1>
";
print SCHREIBEN "<p align\=\"center\">&nbsp;<!--no--></p>
";
print SCHREIBEN "<p align\=\"center\">&nbsp;<!--no--></p>
";
print SCHREIBEN "<p align\=\"center\">&nbsp;<!--no--></p>
";
print SCHREIBEN "<p align\=\"center\">&nbsp;<!--no--></p>
";
print SCHREIBEN "<p align\=\"center\"<font color\=\"#ffffff\"><a
href=\"http://$ip\">Enter</a>
";

close(SCHREIBEN);

#########################################################
# Upload der Datei index.html auf den FTP des Providers # so und da liegt jetzt das problem
#########################################################

use Net::FTP;

$server=<STDIN>
# $server=xxxx
$user=<STDIN>
# user=xxx
$pass=/";

ratte

Re: Net::FTP wie mach ich das mit den modulen

#2 Post by ratte »

lokal hilft die PerlOnlineDocumentation POD weiter:

perldoc perl

in deinem Falle:

perldoc Net::FTP

ok, englisch muss man schon koennen, aber Perl ist ja auch nicht eingedeutscht...



viel spass in der POD
ratte

Post Reply