Hi List , I have this to print:
1
2
3

with this script but it didn't work:
#!/usr/bin/perl
use strict;
use warnings;

{
     local $/;
     my $file = <DATA>;
     while ($file =~ /^\s+(\d+).(.+)$/) {
          print $1\n if $2 =~ /extractStat/;
     }
}

__DATA__
        ?tat    ID  Jour                    Heure         Ligne de
commande
-------------------------------------------------------------------------------

        1   Chaque L Ma Me J V S D  00:20
D:\lotus\notes\extractStat.exe StatA090 j
        10   Demain                  10:00        test\test2
        2   Chaque L Ma Me J V S D  00:21
D:\lotus\notes\extractStat.exe StatA090  m
        25  Tomorow                                only\testing
        3   Chaque L Ma Me J V S D  00:22
D:\lotus\notes\extractStat.exe StatA090 h


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to