Interview Questions And Answers

Q: - What kinds of data are best suited for hashes?

Lists of key-value pairs

Submitted By:-Amrinder            Email-ID: - amrinder_gill1984@rediff.com

Q: - Why doesn't glob("*.*") match all the files in a directory?

Because "*.*" matches only filenames with a dot in them. To match all the files in a directory, use glob("*"). The glob function's patterns are designed to be portable across many operating systems and thus do not behave the same as the *.* pattern in DOS.

Submitted By:-Amrinder            Email-ID: - amrinder_gill1984@rediff.com

Q: - How do I lock DBM files?

DBM files can be locked using the semaphore locking system. Use the get_lock() and release_lock().

Submitted By:-Amrinder            Email-ID: - amrinder_gill1984@rediff.com

 

1
2