List Info

Thread: from PERL to C




from PERL to C
country flaguser name
United States
2007-06-03 08:52:31

hi, im just wondering how can you emulate the -d of PERL to C... so
far, ive tried this out, but have no success(running on win32, using
dev-cpp)

dir = opendir(".");
while(ep = readdir(dir)) {
if(strcmp(ep->d_name, ".") != 0 &&
strcmp(ep->d_name, "..") != 0) {
sprintf(buff, "\%s", ep->d_name);
stat(buff, file_stat);
if(!S_ISDIR(file_stat->st_mode)) {
printf("[%d] : %sn", file_stat->st_mode, ep->d_name);
}
}
}
closedir(dir);

also, my apologies if this is about C, but i believe,its still related
to PERL, and i do think you guys(most of you) are also good in C,,

thanks in advance

---ynth

__._,_.___
.

__,_._,___
[1]

about | contact  Other archives ( Real Estate discussion Medical topics )