Skip to content

Instantly share code, notes, and snippets.

@fgabolde
Created November 29, 2012 15:01
Show Gist options
  • Save fgabolde/4169623 to your computer and use it in GitHub Desktop.
Save fgabolde/4169623 to your computer and use it in GitHub Desktop.
Object-oriented filehandles
#!perl
use strict;
use warnings;
use IO::File;
my $target = shift or die 'no arg? go away';
open my $fh, '>', $target
or die "can't open $target: $!";
$fh->print("oh hey\n");
$fh->close;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment