FTP: Difference between revisions

37 bytes removed ,  6 years ago
→‎{{header|Perl 6}}: As it appears the kernel.org anonymous ftp server is defunct, switch to a fascade test server
No edit summary
(→‎{{header|Perl 6}}: As it appears the kernel.org anonymous ftp server is defunct, switch to a fascade test server)
Line 597:
 
=={{header|Perl 6}}==
{{works with|rakudo|2015-11-022018.04}}
 
<lang perl6>use Net::FTP;
my $host = 'kernel.org';
my $user = 'anonymous';
my $password = '';
 
my $ftp = Net::FTP.new( host => $:host('mirrors.sohu.com'), :passive );
 
$ftp.login( user => $user, pass => $password );
 
say $_<name> for $ftp.ls();</lang>
$ftp.cwd( 'pub/linux/kernel' );
 
say $_<name> for $ftp.ls;
 
$ftp.get( 'README', :binary );</lang>
 
{{out}}
<pre>
CPAN
COPYING
FOOTER.html
CREDITS
FreeBSD
Historic
HEADER.html
README
OpenBSD
SillySounds
anthon
crypto
apache
next
archlinux
people
centos
ports
cygwin
projects
dag
sha256sums.asc
debian
testing
debian-backports
uemacs
debian-cd
v1.0
debian-multimedia
v1.1
debian-security
v1.2
deepin
v1.3
deepin-cd
v2.0
fedora
v2.1
fedora-epel
v2.2
gentoo
v2.3
help
v2.4
images
v2.5
index.html
v2.6
mysql
「v3.0」
nginx
v3.x
opensuse
v4.x
php
python
qt-all
raspbian
rsync
ubuntu
ubuntu-cn
ubuntu-releases
</pre>
 
10,333

edits