We don't bite newbies here... much | |
PerlMonks |
Subtleties of files and directoriesby DeusVult (Scribe) |
on Mar 23, 2001 at 01:21 UTC ( [id://66469]=perlquestion: print w/replies, xml ) | Need Help?? |
DeusVult has asked for the wisdom of the Perl Monks concerning the following question:
Is a directory a file? Do the file operators of perl treat them that way? For example,
My first question is with the first line. Will perl consider $dir to exist and do so for all platforms (that's the important part, otherwise I'd just test it, but I need access to the inner secrets here)? Secondly, is it defined to check if a meaningless word is a directory? Will the last line cause no errors (again, on all platforms)? And finally, on a related note, what happens if I write
and $name is the name of a file, not a directory? Thanks in advance. Some people drink from the fountain of knowledge, others just gargle.
Back to
Seekers of Perl Wisdom
|
|