15.2. Using server storage
15.2.1. Open a file for reading
Using server storage creates a permanent and reliable record for your Web activity, which in many cases is vital for many applications. For a simple page counter, database, or money transaction business, the ability to use server storage is critical.
To open a file using Perl script, the following statement is often used:
open (filehandle, "<filename");
This open command opens the file filename for reading and assigns a filehandle variable to control it. For different file operations, there are different file open modes. Some of the frequently used file open modes are listed in Table 15.1.
Mode | Operation | Description and example |
---|---|---|
< | Reading | Open a file for reading, ... |
Get Practical Web Technologies now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.