X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FFileHandle.pm;h=cd80d1902496910aeef574e8e49bb328e503a834;hb=a062834f6b91f994c046043f1bbf3218aea18281;hp=455fc63917d90f169f1065b6c0ef431476b7b886;hpb=63bfca455098588d6283c6105813307e3523e5b7;p=p5sagit%2Fp5-mst-13.2.git diff --git a/lib/FileHandle.pm b/lib/FileHandle.pm index 455fc63..cd80d19 100644 --- a/lib/FileHandle.pm +++ b/lib/FileHandle.pm @@ -1,8 +1,8 @@ package FileHandle; -use 5.003_11; +use 5.005_64; use strict; -use vars qw($VERSION @ISA @EXPORT @EXPORT_OK); +our($VERSION, @ISA, @EXPORT, @EXPORT_OK); $VERSION = "2.00"; @@ -112,7 +112,7 @@ FileHandle - supply object methods for filehandles use FileHandle; $fh = new FileHandle; - if ($fh->open "< file") { + if ($fh->open("< file")) { print <$fh>; $fh->close; } @@ -225,7 +225,7 @@ supported C methods: Furthermore, for doing normal I/O you might need these: -=over +=over 4 =item $fh->print @@ -238,17 +238,21 @@ See L. =item $fh->getline This works like <$fh> described in L -except that it's more readable and can be safely called in an -array context but still returns just one line. +except that it's more readable and can be safely called in a +list context but still returns just one line. =item $fh->getlines -This works like <$fh> when called in an array context to +This works like <$fh> when called in a list context to read all the remaining lines in a file, except that it's more readable. It will also croak() if accidentally called in a scalar context. =back +There are many other functions available since FileHandle is descended +from IO::File, IO::Seekable, and IO::Handle. Please see those +respective pages for documentation on more functions. + =head1 SEE ALSO The B extension,