use strict; use warnings; my %quotes = comgetter ('Goud', 'Koper'); for my $aandeel (keys %quotes) { print "$aandeel: $_\n" for @{$quotes{$aandeel}}; } sub comgetter { #platinum enzo werkt allemaal nog niet my %quotes; my $html = do {local $/; }; foreach my $aandeel (@_) { my @url = split (/title=\s*"$aandeel"/, $html); my @url1 = split ('\s*/, $url1[1]); push @{$quotes{$aandeel}}, $url2[-1]; } return %quotes; } __DATA__
  Goud 1670.75 +0.15 +0.01%    
  Zilver 30.735 +0.279 +0.92%    
  Koper 3.482 -0.010 -0.29%