summaryrefslogtreecommitdiff
path: root/pod/perlfaq6.pod
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@gmail.com>2004-11-17 10:22:52 +0000
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2004-11-17 10:22:52 +0000
commit28b41a8090d259cff9b1dd87c0c53b3c4a31e822 (patch)
tree82cf112c535e471ad21a6b91f9a020115eb7a66d /pod/perlfaq6.pod
parent4cdaeff7d67594a60bccc7882d3197ee0420932d (diff)
downloadperl-28b41a8090d259cff9b1dd87c0c53b3c4a31e822.tar.gz
PerlFAQ sync.
p4raw-id: //depot/perl@23509
Diffstat (limited to 'pod/perlfaq6.pod')
-rw-r--r--pod/perlfaq6.pod16
1 files changed, 14 insertions, 2 deletions
diff --git a/pod/perlfaq6.pod b/pod/perlfaq6.pod
index d19ba36bf8..6b0f3bb9a4 100644
--- a/pod/perlfaq6.pod
+++ b/pod/perlfaq6.pod
@@ -1,6 +1,6 @@
=head1 NAME
-perlfaq6 - Regular Expressions ($Revision: 1.26 $, $Date: 2004/10/25 18:47:04 $)
+perlfaq6 - Regular Expressions ($Revision: 1.27 $, $Date: 2004/11/03 22:52:16 $)
=head1 DESCRIPTION
@@ -151,7 +151,19 @@ Up to Perl 5.8.0, $/ has to be a string. This may change in 5.10,
but don't get your hopes up. Until then, you can use these examples
if you really need to do this.
-Use the four argument form of sysread to continually add to
+If you have File::Stream, this is easy.
+
+ use File::Stream;
+ my $stream = File::Stream->new(
+ $filehandle,
+ separator => qr/\s*,\s*/,
+ );
+
+ print "$_\n" while <$stream>;
+
+If you don't have File::Stream, you have to do a little more work.
+
+You can use the four argument form of sysread to continually add to
a buffer. After you add to the buffer, you check if you have a
complete line (using your regular expression).