1PerlIO::scalar(3pm)    Perl Programmers Reference Guide    PerlIO::scalar(3pm)
2
3
4

NAME

6       PerlIO::scalar - in-memory IO, scalar IO
7

SYNOPSIS

9          my $scalar = '';
10          ...
11          open my $fh, "<",  \$scalar or die;
12          open my $fh, ">",  \$scalar or die;
13          open my $fh, ">>", \$scalar or die;
14
15       or
16
17          my $scalar = '';
18          ...
19          open my $fh, "<:scalar",  \$scalar or die;
20          open my $fh, ">:scalar",  \$scalar or die;
21          open my $fh, ">>:scalar", \$scalar or die;
22

DESCRIPTION

24       A filehandle is opened but the file operations are performed "in-mem‐
25       ory" on a scalar variable.  All the normal file operations can be per‐
26       formed on the handle. The scalar is considered a stream of bytes.  Cur‐
27       rently fileno($fh) returns "undef".
28

IMPLEMENTATION NOTE

30       "PerlIO::scalar" only exists to use XSLoader to load C code that pro‐
31       vides support for treating a scalar as an "in memory" file.  One does
32       not need to explicitly "use PerlIO::scalar".
33
34
35
36perl v5.8.8                       2001-09-21               PerlIO::scalar(3pm)
Impressum