亚洲乱码中文字幕综合,中国熟女仑乱hd,亚洲精品乱拍国产一区二区三区,一本大道卡一卡二卡三乱码全集资源,又粗又黄又硬又爽的免费视频

Perl使用chdir的實(shí)例代碼

 更新時(shí)間:2013年02月05日 13:58:37   作者:  
Perl使用chdir的例子,供朋友們參考學(xué)習(xí)

復(fù)制代碼 代碼如下:

use strict;
use warnings;

# Print all files in a directory
sub print_files {
    my $dir = 'd:/code';
    opendir DIR, $dir or die $!;
    my @files = readdir DIR;
    chdir $dir; # Use chdir or -f will not work, since -f need absolutely path
    foreach my $file (@files) {
        if (-f $file) {
            print "$file\n";
        }
    }
    closedir DIR;
}

&print_files();

相關(guān)文章

最新評(píng)論