文件操作 - htitle
返回文件管理
返回主菜单
删除本文件
文件: /usr/share/doc/libhtml-parser-perl/examples/htitle
编辑文件内容
#!/usr/bin/perl # This program will print out the title of an HTML document. use strict; use warnings; use HTML::Parser (); sub title_handler { my $self = shift; $self->handler(text => sub { print @_ }, "dtext"); $self->handler(end => "eof", "self"); } my $p = HTML::Parser->new( api_version => 3, start_h => [\&title_handler, "self"], report_tags => ['title'], ); $p->parse_file(shift || die) || die $!; print "\n";
修改文件时间
将文件时间修改为当前时间的前一年
删除文件