
perlkid
stranger
Sep 19, 2000, 12:50 AM
Post #1 of 5
(4471 views)
|
An array question.
|
Can't Post
|
|
Ok this is confusing, Here is what I need to do, I have an array, I put my data in the array by doing this, <BLOCKQUOTE><font size="1" face="Arial,Helvetica,sans serif">code:</font><HR> push(@alts, ucfirst($in{'0'}), $in{'url'}); push(@alts, ucfirst($in{'1'}), $in{'1url'}); push(@alts, ucfirst($in{'2'}), $in{'2url'}); push(@alts, ucfirst($in{'3'}), $in{'3url'}); push(@alts, ucfirst($in{'4'}), $in{'4url'}); push(@alts, ucfirst($in{'5'}), $in{'5url'}); push(@alts, ucfirst($in{'6'}), $in{'6url'}); push(@alts, ucfirst($in{'7'}), $in{'7url'}); push(@alts, ucfirst($in{'8'}), $in{'8url'}); push(@alts, ucfirst($in{'9'}), $in{'9url'}); .... until $in{'url50'} </pre><HR></BLOCKQUOTE> Now I need to loop through the data and preform a regex on the $in{'9url'} part, but not the $in{'9'}. Basically, How do I handle the data in column 2 differently than in column one. Then print out the data. I got the printint part down. This is hard for me to even explain. Do you see what I'm trying to do here? I'll give an example. The url is "http://www.site.com" and the link is called "click here" I would loop through the data and add the string "http://www.mysite.com/redir.pl?url=" before the url. As for the link name I would just print it as is. Now can you picture what I'm trying to do? It's not exactly what I need to do but it's a good example. What I'm really doing is very much more confusing and that's why I used an example different than what I'm doing. I hope you can help me out, Is this a multidimensional array that I'm talking about? Thanks, perlkid
|