in reply to why does this perl routine error?
The 1st "Use of uninitialized value in split" warning message you get is because the @url array does not have more that one element. Therefore, $url[1] is undefined. You can prove this to yourself by adding this debug line:
@url = split( /Realtime koers $aandeel/, $html ); print scalar(@url), "\n"; # show number of elements in array
See also:
- Basic debugging checklist
- You should consider using an HTML parser.
In Section
Seekers of Perl Wisdom