![]() |
|
No such thing as a small change | |
PerlMonks |
Re: Perl counter in cgi-binby Mr. Muskrat (Canon) |
on Jun 05, 2004 at 15:50 UTC ( #361622=note: print w/replies, xml ) | Need Help?? |
You are not testing whether the open statements worked before continuing on. Also, what is the point of the for loop? A simple print $data; should suffice since the numbers will all appear on one line once the funky stuff is removed (since you are not printing a <br />). The funky stuff that I mentioned are the curly braces and they are killing the script. Here's your for loop with the curly braces removed (and a couple mys for good measure):
Here is another way to do that loop (bonus! I added the <br />s):
Someone is bound to say this if I don't.... You can even do it with a one-liner:
Update: Rewrote the last sentence in the second paragraph for clarity.
In Section
Seekers of Perl Wisdom
|
|