Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: Foreach in a 2D array

by geekgrrl (Pilgrim)
on Oct 28, 2004 at 15:48 UTC ( [id://403420]=note: print w/replies, xml ) Need Help??


in reply to Foreach in a 2D array

I have two suggestions - one answers your question and the other makes it easier to read that print statement.

  1. foreach $option (@{$dataoptions{$columns[$i]}})
    This dereferences your array - it is just a way to do it without having to save it to another variable first.
  2. print qq(<input type="radio" name="$columns[$i]" value="$option">$opti +on);
    This makes it easier to read the HTML tag.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (2)
As of 2024-06-25 05:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    erzuuli‥ 🛈The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.