Thread Anfänger IF-Problem (8 answers)
Opened by keeperin at 2007-12-04 17:27

pq
 2007-12-04 20:02
#103450 #103450
User since
2003-08-04
12208 Artikel
Admin1
[Homepage]
user image
Code (perl): (dl )
1
2
3
4
5
6
7
chomp(my $runlevel = qx{/sbin/runlevel});
if ($runlevel eq '4 3') {
    print "RUNLEVEL 3\n";
}
elsif ($runlevel eq '3 4') {
    ...
}


edit: schliessende klammer bei chomp(); danke renee
Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live. -- Damian Conway in "Perl Best Practices"
lesen: Wiki:Wie frage ich & perlintro Wiki:brian's Leitfaden für jedes Perl-Problem

View full thread Anfänger IF-Problem