Thread Zweistufige Hash-Referenz zuweisen (36 answers)
Opened by mikdoe at 2009-06-03 20:50

mikdoe
 2009-06-03 23:57
#122308 #122308
User since
2007-08-13
98 Artikel
BenutzerIn
[default_avatar]
Jo Linuxer, Dir auch dann mal vielen Dank für die Hilfe. Habe Dein Script mal auf meine Anwendung übersetzt:

Code (perl): (dl )
1
2
3
4
5
6
7
8
9
10
11
12
13
14
my @keys = keys (%$hash_ref);
foreach my $k (sort {lc $keys[$a] cmp lc $keys[$b]} 0..$#keys) {
        print substr($keys[$k] . '.' x 30,0,30) . ' => ';
        if ($keys[$k] eq 'bic_candidates') {
                print "(Untermenge wie folgt:)\n";
                for my $e ( @{ $hash_ref->{$k} } ) {
            print "$e\n";
        }
        }
        else {
                print (defined $hash_ref -> {$keys[$k]} ? (length $hash_ref -> {$keys[$k]} > 65 ? substr($hash_ref -> {$keys[$k]},0,60) . '...' : $hash_ref -> {$keys[$k]}) : 'NOT DEFINED');
        }
        print "\n";
}


Ausgabeergebnis ist:

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
account_check................. => passed
account_number................ => 12345678
account_validation............ => Methode C1, Variante 1, Konto 12345678, BLZ 12345678, Pr³f...
account_validation_method..... => C1
alternative_account_number.... => NOT DEFINED
alternative_bank_code......... => NOT DEFINED
balance....................... => 79
bank.......................... => ING-DiBa
bank_address.................. => NOT DEFINED
bank_code..................... => 12345678
bank_code_check............... => passed
bank_url...................... => NOT DEFINED
bic_candidates................ => (Untermenge wie folgt:)

bic_plausibility_check........ => NOT DEFINED
branch........................ =>
branch_code................... => NOT DEFINED
checks........................ => ARRAY(0x2087968)
country....................... => DE
data_age...................... => 20090309
formatcomment................. => B = sort code (BLZ), C = account No.
iban.......................... => DE48500105170648479930
IBANformat.................... => DEkk BBBB BBBB CCCC CCCC CC
length_check.................. => passed
result........................ => passed


Warum wird die Untermenge von "bic_candidates" und "checks" nicht angezeigt?

Danke Euch

mod-edit pq: kontodaten anonymisiert!
Last edited: 2009-06-04 00:13:39 +0200 (CEST)

View full thread Zweistufige Hash-Referenz zuweisen