Thread durch eigene error_log läuft script (18 answers)
Opened by bieber at 2007-08-02 10:43

bloonix
 2007-08-02 13:40
#97264 #97264
User since
2005-12-17
1615 Artikel
HausmeisterIn
[Homepage]
user image
renee+2007-08-02 11:32:51--
Nö, denn dann ist es nicht mehr "uninitialized"...

Wieso nö?

Code: (dl )
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use strict;
use warnings;

my @datei = (' ');

foreach(@datei){
# leerzeilen interessieren nicht...
next if /^$/;
my $check="false"; #rücksetzen der checkVariabel
chomp; my @work = split /\s+/; #jede Zeile der Datei ins array "work" laden, je Trennzeichen
$work[0]=~ s/^\s+//g; #leerzeichen zu beginn einer Zeile löschen
next if substr ($work[0],0,1) eq '#'; #nächste Zeile der datei wenn das erste Zeichen "#" ist
next if substr ($work[0],0,1) eq ';';
next if substr ($work[0],0,1) eq '';
}


Use of uninitialized value in substitution (s///) at ./test.pl line 12.
Use of uninitialized value in substr at ./test.pl line 13.
Use of uninitialized value in substr at ./test.pl line 14.
Use of uninitialized value in substr at ./test.pl line 15.


@work ist leer, also reicht /^$/ nicht!
What is a good module? That's hard to say.
What is good code? That's also hard to say.
One man's Thing of Beauty is another's man's Evil Hack.

View full thread durch eigene error_log läuft script