summaryrefslogtreecommitdiff
path: root/lib/FileHandle.pm
diff options
context:
space:
mode:
authorRicardo SIGNES <rjbs@cpan.org>2009-01-20 18:32:17 -0500
committerVincent Pit <vince@profvince.com>2009-01-21 16:54:16 +0100
commit2b393bf410d9f1bf0b80132c4e8b5d6707a139f8 (patch)
treefba97a93f415d38a8053cb90ef68b23c24b7de7e /lib/FileHandle.pm
parent797f796a9610b63f252016d76732152c8ff9fb39 (diff)
downloadperl-2b393bf410d9f1bf0b80132c4e8b5d6707a139f8.tar.gz
now get non-dual lived code
Diffstat (limited to 'lib/FileHandle.pm')
-rw-r--r--lib/FileHandle.pm8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/FileHandle.pm b/lib/FileHandle.pm
index 6be2242944..b609614d5d 100644
--- a/lib/FileHandle.pm
+++ b/lib/FileHandle.pm
@@ -111,25 +111,25 @@ FileHandle - supply object methods for filehandles
use FileHandle;
- $fh = new FileHandle;
+ $fh = FileHandle->new;
if ($fh->open("< file")) {
print <$fh>;
$fh->close;
}
- $fh = new FileHandle "> FOO";
+ $fh = FileHandle->new("> FOO");
if (defined $fh) {
print $fh "bar\n";
$fh->close;
}
- $fh = new FileHandle "file", "r";
+ $fh = FileHandle->new("file", "r");
if (defined $fh) {
print <$fh>;
undef $fh; # automatically closes the file
}
- $fh = new FileHandle "file", O_WRONLY|O_APPEND;
+ $fh = FileHandle->new("file", O_WRONLY|O_APPEND);
if (defined $fh) {
print $fh "corge\n";
undef $fh; # automatically closes the file