Name

open

Synopsis

$fd = open($file, $mode)

This function opens the given file using the given mode and associates a file descriptor with the file. The defined modes are as follows:

>

Open the file for writing.

<

Open the file for reading.

<>

Open the file for reading or writing.

<P

Create a named pipe and open it for reading.

>P

Create a named pipe and open it for writing.

<|

Execute the file as a command and read the output.

>|

Execute the file as a command and write to the process.

Get MySQL and mSQL 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.