Thread Newbie - Einlesen von Text in arrays (18 answers)
Opened by PatrickS at 2004-12-27 15:24

Taulmarill
 2004-12-28 03:28
#50368 #50368
User since
2004-02-19
1750 Artikel
BenutzerIn

user image
TIMTOWTDI ( aka there is more than one way to do it )

1. anforderung:
Code: (dl )
1
2
3
4
5
open DATAIN, '<old_data.txt' or die $!;
open DATAUOT 'new_data.txt' or die $!;
print DATAOUT /CODE=(\d*)/, " ", /Ursrpung=(\d*)/, "\n" while <DATAIN>;
close DATAIN;
close DATAOUT;


2. anforderung:
Code: (dl )
1
2
3
4
5
6
open DATAIN, '<old_data.txt' or die $!;
open DATAUOT 'new_data.txt' or die $!;
print DATAOUT join " ", /CODE=(\d*)/, /Zustand=(\w*)/, /Ursrpung=(\d*)/,
/TYP=(\d*)/, /KENNUNG=(\w*)/, "\n" while <DATAIN>;
close DATAIN;
close DATAOUT;
$_=unpack"B*",~pack"H*",$_ and y&1|0& |#&&print"$_\n"for@.=qw BFA2F7C39139F45F78
0A28104594444504400 0A2F107D54447DE7800 0A2110453444450500 73CF1045138445F4800 0
F3EF2044E3D17DE 8A08A0451412411 F3CF207DF41C79E 820A20451412414 83E93C4513D17D2B

View full thread Newbie - Einlesen von Text in arrays