As was just pointed out to me recently, it is best to not use your scratchpad to post code in, as when someone checks this post out in the future, it is likely that code will change. If you don't mind, update your post to include the code instead of the link. For now, here it is:
#usr/bin/perl -w #=for comment #pseudocode: #start event loop # gather input, then act on input # actions are print statements #=cut $quit = 0; $answer = "blank"; while ($quit == 0) { print "Do you want to loop?\n"; $answer = <STDIN>; print $answer; }
From the looks of it, this code *should* run (untested), however because your shebang line is broken, the file won't process as code perl can interpret. It should be:
#!/usr/bin/perlBeyond that, again, because you're not using
use strict; use warnings;
(which you should), you're not defining anything lexically.
Furthermore, in the code you did actually include in your post, your code has to go underneath the =cut, not embraced in it.
Update: you need to read perldoc perlpod. Also, if possible, perhaps you could retitle your post to something more descriptive such as "Problems with multiline comments" or some such.
Update2: I'm kind of sorry for the Slashdot-style Consideration note. I can't explain why I did that as it has been so long since I've seen it used. It just came out ;) Also, the recommended title should have stated "Problems with perlpod", not perldoc.
In reply to Re: simple newb question
by stevieb
in thread simple newb question
by filesurfer
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |