13.07.2015 Views

Perl 语言编程 - Linux教程

Perl 语言编程 - Linux教程

Perl 语言编程 - Linux教程

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

my($self) = @_;getc($self);}并 且 在 TIEHANDLE 和 OPEN 里 设 置 路 径 名 :sub TIEHANDLE {my $class= shift;my $form = shift;my $name = "$form@_";# NEWopen my $self, $form, @_ or croak "can't open $name: $!";if ($form =~ />/) {print $self "\n";$$self->{WRITING} = 1;# Remember to do end tag}bless $self, $class;$self->pathname($name);# $fh is a glob ref# NEWreturn $self;}sub OPEN { $_[0]->trace;# NEWmy $self = shift;my $form = shift;my $name = "$form@_";$self->CLOSE;open($self, $form, @_) or croak "can't reopen $name: $!";387

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!