why do I get only one quote in @quotes? Thank you very much in advancesub stockquotegetter { my @quotes; $html = get("http://www.iex.nl/Koersen/Aandelen.aspx") or die "Couldn't fetch the stock quotes"; foreach $aandeel (@_) { @url = split(/Realtime koers $aandeel/, $html); @url1 = split(/LastPrice"><span>/, $url[1]); @url2 = split(/</, $url1[1]); #$html =~ m{basevalues['11754LastPrice'] = ([\d,]+) ;}; #printf $_; #printf $sales_rank #$html =~ m{ '11754LastPrice'] = (.*?);}i; # extract destination + of link #$url = $1; printf "$aandeel $url2[0]\n"; push (@quotes,$url2[0]); } printf @quotes } printf &stockquotegetter(qw(Aegon Aperam ING ASML DSM Boskalis KPN Ran +dstad PostNL TomTom));
In reply to list pushing by robertw
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |