我正在尝试将这个“ServerLog(07-05-2013@22-07)”变成一个正则表达式。
my $filename = q{ServerLog((\d+)-(\d+)-(\d+)@(\d+)-(\d+))};
这就是我所拥有的,但它不起作用。有什么建议么?
编辑:这行得通吗?
my $filename = q{ServerLog\((\d+)-(\d+)-(\d+)@(\d+)-(\d+)\)};
my $log = "<D:\\ServerTools\\Logs\\$filename";
my $ref = tie *FH,"File::Tail",(name=>$log);