Hi,
ich hab ein File (welches im array @file ist), welches wie folgt aussieht:
asadf
asdfas sd
asdfsf
ID
1
2
3
adsf a
sad
f
asdf
sadf
ID
2
34
6
sadfasd
asdf
usw.
Nun will ich alles was nach der ID kommt bis zur Leerzeile ausgeben.
Ich weiss nun nicht, wie man das am besten anstellt. Vielleicht irgendwie die Arrayelemente "shiften"? Kein Plan.
Mein Miniansatz bislang ...
foreach my $i (@file)
{
if ($i =~ /ID/) { ??? }
}
Tipps?
Danke.
MfG,
Klaus