#!/usr/bin/perl use strict; while (<DATA>) { #lecture du fichier chomp; if (/^HI( |\t)*COC/) { my $song; my $hour_dla; while (<DATA>) { chomp; if ( /(^-)(song.*)/) { $song = $2; } if ( /^-chicken.*(\d\d)(\d\d)(\d\d)/) { $hour_dla = join(":",$2,$3); print "$song;$hour_dla\n"; } last if (/^HI.*/) } } } __DATA__ HI COCORICO -song HELLO -chicken 250420 -forest -data data -data 1
In reply to Re: display problem
by moritz
in thread display problem
by steph_bow
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |