[ create a new paste ] login | about

Link: http://codepad.org/zOkH5kFW    [ raw code | output | fork ]

Perl, pasted on Dec 12:
1
2
3
4
5
6
print "Compare glob and readdir in Perl version ",$],"\n";
my @glob = sort glob "*";
opendir A, "." or die $!;
my @rd = sort readdir A;
print "Files found by glob     : @glob\n";
print "Files found by readdir  : @rd\n";


Output:
1
2
3
Compare glob and readdir in Perl version 5.008
Files found by glob     : lib lock t.pl usr
Files found by readdir  : . .. lib lock t.pl usr


Create a new paste based on this one


Comments: