Thread Perl: Problem bei Parsen (6 answers)
Opened by OnkelBlacky at 2004-08-23 09:36

Taulmarill
 2004-08-23 11:56
#49571 #49571
User since
2004-02-19
1750 Artikel
BenutzerIn

user image
TIMTOWTDI

Code: (dl )
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/usr/local/bin/perl

use strict;
use warnings;
use Data::Dumper;

my @foo;

while ( <DATA> ) {
  push @foo, m/\\\\(\w+)/;
}

print Dumper \@foo;

# ohne Leerzeichen:
_ _DATA_ _

Servername             Beschreibung

-----------------------------------------------------------
\\SAPTRANSHOST         SAP Rechner
\\SCHUFA02             samba exports
\\SNAGATE1
\\TRABI
\\WOLGA
\\WUNALA               Datenbank- und Entwicklungsserver


edit renee: das von Crian geforderte _DATA_ eingefügt ;)\n\n

<!--EDIT|renee|1093250950-->
$_=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 Perl: Problem bei Parsen