Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: Really need help with loop variable

by Caillte (Friar)
on Feb 13, 2002 at 18:19 UTC ( #145236=note: print w/ replies, xml ) Need Help??


in reply to Really need help with loop variable

To get your code to work you need something like this:

use strict; my $total_elements = 8; my $NEW_BUS_TXT; my $NEW_BUS_TXT1 = 123; my $NEW_BUS_TXT2 = 123; my $NEW_BUS_TXT3 = 123; my $NEW_BUS_TXT4 = 123; my $NEW_BUS_TXT5 = 123; my $NEW_BUS_TXT6 = 123; my $NEW_BUS_TXT7 = 123; my $NEW_BUS_TXT8 = 123; my $NEW_BUS_TXT9 = 123; my $NEW_PD1 = 123; my $NEW_PD2 = 234; my $NEW_PD3 = 345; my $NEW_PD4 = 456; my $NEW_PD5 = 567; my $NEW_PD6 = 678; my $NEW_PD7 = 789; my $NEW_PD8 = 890; my $NEW_PD9 = 901; my $varname = ''; for (my $x=1; $x <= $total_elements +1; $x++) { $varname .= "fname_menu$x"; $NEW_BUS_TXT = eval "\$NEW_BUS_TXT$x"; $varname .= " <table border='1' width='100%' bgcolor='#BBEEEE' +> <tr> <td width='100%'> <B>($x.)Using the pull down menu Select a member</B>" +. eval "\$NEW_PD$x". "\n"; } print $varname;

To get your code to actually do something useful will take longer. How about you let us know a little about what you want to do here.

This page is intentionally left justified.


Comment on Re: Really need help with loop variable
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://145236]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (7)
As of 2014-10-25 15:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (145 votes), past polls