summaryrefslogtreecommitdiff
path: root/pod/perlvar.pod
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>1999-02-15 04:45:55 +0000
committerGurusamy Sarathy <gsar@cpan.org>1999-02-15 04:45:55 +0000
commit883faa132e8bf2c932ff9f7c1722950f4325a1d7 (patch)
treedb446189b677abfb9798e54654fd8e65460b21dd /pod/perlvar.pod
parent29f227c9ad9c7325fbd0ac33567c35e06a70acb5 (diff)
downloadperl-883faa132e8bf2c932ff9f7c1722950f4325a1d7.tar.gz
clarify what a "line" is
p4raw-id: //depot/perl@2932
Diffstat (limited to 'pod/perlvar.pod')
-rw-r--r--pod/perlvar.pod10
1 files changed, 8 insertions, 2 deletions
diff --git a/pod/perlvar.pod b/pod/perlvar.pod
index 38d6d3299e..2dafc1ca1a 100644
--- a/pod/perlvar.pod
+++ b/pod/perlvar.pod
@@ -222,7 +222,10 @@ the C</s> and C</m> modifiers on pattern matching.
=item $.
The current input line number for the last file handle from
-which you read (or performed a C<seek> or C<tell> on). An
+which you read (or performed a C<seek> or C<tell> on). The value
+may be different from the actual physical line number in the file,
+depending on what notion of "line" is in effect--see L<$/> on how
+to affect that. An
explicit close on a filehandle resets the line number. Because
"C<E<lt>E<gt>>" never does an explicit close, line numbers increase
across ARGV files (but see examples under eof()). Localizing C<$.> has
@@ -238,7 +241,8 @@ number.)
=item $/
-The input record separator, newline by default. Works like B<awk>'s RS
+The input record separator, newline by default. This is used to
+influence Perl's idea of what a "line" is. Works like B<awk>'s RS
variable, including treating empty lines as delimiters if set to the
null string. (Note: An empty line cannot contain any spaces or tabs.)
You may set it to a multi-character string to match a multi-character
@@ -278,6 +282,8 @@ likely not a problem, as any file you'd want to read in record mode is
probably usable in line mode) Non-VMS systems perform normal I/O, so
it's safe to mix record and non-record reads of a file.
+Also see L<$.>.
+
=item autoflush HANDLE EXPR
=item $OUTPUT_AUTOFLUSH