#!/usr/bin/perl
use strict;
use warnings;
#my $filename = "akre66_test2.txt";
#my $FILE;
#
#open($FILE,$filename) or die("Fichier $filename introuvable");
#my @contenu = <$FILE>;
#close($FILE);
my @contenu = <DATA>;
if (/.*\
s+DONNEES
\sGENERALES.*EPUISEMENT\sMOYEN\
.+:\
s+([^\
s]+) .*PUISSANCE\sRELATIVE\
.+:\
s+([^\
s]+) .*BORE\sSOLUBLE\
.+:\
s+([^\
s]+) .*\
s+COMMENTAIRES
\sLIBRES/xs
) { } else {
print "Erreur de format du fichier\n"; }
__END__
DONNEES GENERALES
-----------------
CENTRALE....................: XXX
TRANCHE.....................: X
CYCLE.......................: X
EPUISEMENT MOYEN............: AAAA Mwj/T
PUISSANCE NOMINALE..........: XXX
PUISSANCE RELATIVE..........: AAAA
BORE SOLUBLE................: AAAA
MODE DE PILOTAGE............: X
ENFONCEMENT DES GRAPPES (pas extraits)
G1 .......... AAA
G2 .......... AAAA
N1 .......... AAAA
N2 .......... AAAA
R .......... AAAA
COMMENTAIRES LIBRES
-------------------
Truc, machin, bidule PUISSANCE RELATIVE, N1, R.
IyEvdXNyL2Jpbi9wZXJsCnVzZSBzdHJpY3Q7CnVzZSB3YXJuaW5nczsKICAgICAgICAgICAgIAojbXkgJGZpbGVuYW1lID0gImFrcmU2Nl90ZXN0Mi50eHQiOwojbXkgJEZJTEU7CiMgCiNvcGVuKCRGSUxFLCRmaWxlbmFtZSkgb3IgZGllKCJGaWNoaWVyICRmaWxlbmFtZSBpbnRyb3V2YWJsZSIpOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiNteSBAY29udGVudSA9IDwkRklMRT47CiNjbG9zZSgkRklMRSk7CgpteSBAY29udGVudSA9IDxEQVRBPjsKIAokXyA9IGpvaW4oIiIsIEBjb250ZW51KTsKaWYgKC8uKlxzK0RPTk5FRVNcc0dFTkVSQUxFUy4qRVBVSVNFTUVOVFxzTU9ZRU5cLis6XHMrKFteXHNdKykKICAgIC4qUFVJU1NBTkNFXHNSRUxBVElWRVwuKzpccysoW15cc10rKQogICAgLipCT1JFXHNTT0xVQkxFXC4rOlxzKyhbXlxzXSspCiAgICAuKkcxXHMrXC4rXHMrKFteXHNdKykKICAgIC4qRzJccytcLitccysoW15cc10rKQogICAgLipOMVxzK1wuK1xzKyhbXlxzXSspCiAgICAuKk4yXHMrXC4rXHMrKFteXHNdKykKICAgIC4qUlxzK1wuK1xzKyhbXlxzXSspCiAgICAuKlxzK0NPTU1FTlRBSVJFU1xzTElCUkVTL3hzKSB7CiAgICBwcmludCAiJDFcbiI7CiAgICBwcmludCAiJDJcbiI7CiAgICBwcmludCAiJDNcbiI7CiAgICBwcmludCAiJDRcbiI7CiAgICBwcmludCAiJDVcbiI7CiAgICBwcmludCAiJDZcbiI7CiAgICBwcmludCAiJDdcbiI7CiAgICBwcmludCAiJDhcbiI7Cn0gZWxzZSB7CiAgICBwcmludCAiRXJyZXVyIGRlIGZvcm1hdCBkdSBmaWNoaWVyXG4iOwp9Cl9fRU5EX18KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKCiAgICAgICAgICAgICBET05ORUVTIEdFTkVSQUxFUwogICAgICAgICAgICAgLS0tLS0tLS0tLS0tLS0tLS0KCgogQ0VOVFJBTEUuLi4uLi4uLi4uLi4uLi4uLi4uLjogIFhYWAogVFJBTkNIRS4uLi4uLi4uLi4uLi4uLi4uLi4uLjogICAgICAgWCAgICAgICAgIAogQ1lDTEUuLi4uLi4uLi4uLi4uLi4uLi4uLi4uLjogICAgICBYCiBFUFVJU0VNRU5UIE1PWUVOLi4uLi4uLi4uLi4uOiAgICAgICBBQUFBIE13ai9UCiBQVUlTU0FOQ0UgTk9NSU5BTEUuLi4uLi4uLi4uOiAgICBYWFgKIFBVSVNTQU5DRSBSRUxBVElWRS4uLi4uLi4uLi46ICAgICBBQUFBCiBCT1JFIFNPTFVCTEUuLi4uLi4uLi4uLi4uLi4uOiAgICAgQUFBQSAgCiBNT0RFIERFIFBJTE9UQUdFLi4uLi4uLi4uLi4uOiAgWAogRU5GT05DRU1FTlQgREVTIEdSQVBQRVMgKHBhcyBleHRyYWl0cykKICAgICAgICAgICAgICAgRzEgIC4uLi4uLi4uLi4gICAgIEFBQQogICAgICAgICAgICAgICBHMiAgLi4uLi4uLi4uLiAgICAgQUFBQQogICAgICAgICAgICAgICBOMSAgLi4uLi4uLi4uLiAgICBBQUFBCiAgICAgICAgICAgICAgIE4yICAuLi4uLi4uLi4uICAgICBBQUFBCiAgICAgICAgICAgICAgIFIgICAuLi4uLi4uLi4uICAgICBBQUFBCgogICAgICAgICAgICAgICAgIAogICAgCiAgICAKICAgICAgICAgICAgIENPTU1FTlRBSVJFUyBMSUJSRVMKICAgICAgICAgICAgIC0tLS0tLS0tLS0tLS0tLS0tLS0KICAgIApUcnVjLCBtYWNoaW4sIGJpZHVsZSBQVUlTU0FOQ0UgUkVMQVRJVkUsIE4xLCBSLg==