Thread Die letzte Zeile ist immer der return (6 answers)
Opened by rosti at 2017-12-06 17:27

rosti
 2017-12-06 20:42
#187701 #187701
User since
2011-03-19
3180 Artikel
BenutzerIn
[Homepage]
user image
Ahaa, danke, {} als BLock, das ist es. Aufgefallen ist mir das hier:

Code (perl): (dl )
1
2
3
4
5
6
7
8
9
10
11
12
# Wochentag numerisch {num}, 
# abgekürzt{abb}, voll{full}
sub wd{
    my $self = shift;
    my $day   = shift;
    my $month = shift;
    my $year  = shift;
    return {split /\s+/, strftime( 
        'num %w abb %a full %A', 0, 0, 0, 
        $day, $month-1, $year-1900 
    )};
}


da kommt ohne 'return' das ganze Array statt Hashreferenz. MfG

View full thread Die letzte Zeile ist immer der return