Thread Perl Bug bei int? (44 answers)
Opened by Rolf_PlusW at 2013-03-01 11:29

Gast wer
 2013-03-02 13:04
#166145 #166145
Code (perl): (dl )
1
2
3
4
5
6
7
8
sub integer {
    my $wert = shift ( @_ ) || 0;
    return 'FEHLER' if $wert =~ /e\+?\d+$/;
    return 0 if $wert =~ /e-\d+$/;
    $wert=$1 if $wert =~ /^(.*?)\./;
    $wert=0 if !$wert or $wert == -0;
    return $wert;
}

Last edited: 2013-03-02 13:19:21 +0100 (CET)

View full thread Perl Bug bei int?