Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: Really need help with loop variable

by Caillte (Friar)
on Feb 13, 2002 at 18:19 UTC ( [id://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.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (5)
As of 2024-03-28 20:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found