Добрый день Moscow.pm
Не могу понять регулярки перл!
#!/usr/bin/perl
use strict;
use warnings;
use utf8;
use open qw/ :encoding(utf8) :std /;
#use open qw/ :encoding(cp1251) :std /;
my @_onfil_ = @ARGV;
open(INFIL, "<:encoding(cp866)", $onfil[0])
or die "NO STANDART $!";
while (<INFIL>) {
$_ =~ s/\h+//g;
$_ =~ s/\|/;/g;
$_ =~ s///g;
$_ =~ s/^(.*;).*;.*;.*;.*;.*;(.*;.*;.*;.*;.*;.*;)$//g; # Не удаляется в скобках
print;
}
close INFIL;
__END__
use strict;
use warnings;
use utf8;
use open qw/ :encoding(utf8) :std /;
#use open qw/ :encoding(cp1251) :std /;
my @_onfil_ = @ARGV;
open(INFIL, "<:encoding(cp866)", $onfil[0])
or die "NO STANDART $!";
while (<INFIL>) {
$_ =~ s/\h+//g;
$_ =~ s/\|/;/g;
$_ =~ s///g;
$_ =~ s/^(.*;).*;.*;.*;.*;.*;(.*;.*;.*;.*;.*;.*;)$//g; # Не удаляется в скобках
print;
}
close INFIL;
__END__
Может что нибудь посоветуете
зы: Z yjdbxjr d Зукл
--
Специалист IT, GNU, FLOSS, Open Source
Специалист IT, GNU, FLOSS, Open Source
Моб: +7 (951) 131 33 90
С уважением,
Кузьменко Константин Викторович
-- Moscow.pm mailing list [email protected] | http://moscow.pm.org
