Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: Yet Another Stupid CGI Question

by netjackal (Acolyte)
on Oct 19, 2001 at 14:26 UTC ( [id://119932]=note: print w/replies, xml ) Need Help??


in reply to Yet Another Stupid CGI Question

Instead of putting the foreach loop in the print statement itself you could always do something like this

my @array = ( 4,5,3,4,5); print function(),"\n"; sub function { my $rv; foreach my $item (@array) { $rv .= $item . "\t"; } return $rv; }

and put the foreach loop in a sub (or anon. sub). I know the example above looks silly but i had to work the foreach in to illustrate my point. HTH

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://119932]
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: (7)
As of 2024-04-19 08:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found