Thread Array of Hashes aus externer Datei includen?
(5 answers)
Opened by undersok at 2011-09-30 11:19
Zweite Version mit user strict + warnings. ;)
main.pl Code (perl): (dl
)
1 2 3 4 5 6 7 8 9 10 use strict; use warnings; my $i=1; our @workflow; require "$i.pm"; print $workflow[$i]{State}, "\n"; print $workflow[$i]{Followup}, "\n"; Code (perl): (dl
)
1 2 3 4 5 6 7 8 9 10 use strict; use warnings; my $i=1; use vars qw/@workflow/; require "$i.pm"; print $workflow[$i]{State}, "\n"; print $workflow[$i]{Followup}, "\n"; 1.pm Code (perl): (dl
)
1 2 3 4 5 6 7 8 9 10 11 use strict; use warnings; our @workflow = ( {State => "Blah", Followup => "Blubb", }, {State => "Blah2", Followup => "Blubb2", }, ); Last edited: 2011-09-30 12:47:21 +0200 (CEST) |