Leser: 26
1 2 3 4 5 6
my %config=( debug=>0, # Kontrollausgaben .... ); my %stop_id = (); my %stop_name = ();
ReportErstellen ($fh, "highway = bus_stop", $osm, \%stop_id, \%stop_name, \%config);
1 2 3 4 5 6 7 8
sub ReportErstellen { my $file = shift; my $title = shift; my $osm_data = shift; my %poi_id_ref = shift; my %poi_name_ref = shift; my %conf_ref = shift;
1 2 3 4 5 6 7 8 9 10 11 12
sub ReportErstellen { my $file = shift; my $title = shift; my $osm_data = shift; my %poi_id_ref = %{shift}; my %poi_name_ref = %{shift}; my %conf_ref = %{shift}; #oder: my $poi_id_ref = shift; $poi_id_ref->{key} = value; # hier dereferenziert der -> Operator
QuoteAmbiguous use of %{shift} resolved to %shift at svhl_check.pl line 368.
Ambiguous use of %{shift} resolved to %shift at svhl_check.pl line 369.
Ambiguous use of %{shift} resolved to %shift at svhl_check.pl line 370.
2011-05-19T14:06:50 jan99wenn ich die erste Variante verwende, was auch ausreicht da in der Sub die Daten nur ausgelesen werden komme ich die Meldung
ReportErstellen ($fh, "highway = bus_stop", $osm, \%stop_id, \%stop_name, \%config);
1 2 3 4 5 6 7 8 9 10
my $href = { FH => $fh, STR => "highway = bus_stop", OSM => $osm, STOPID => \%stop_id, STOPNAME => \%stop_name, CFG => \%config, }; ReportErstellen($href);