|Just another Perl shrine|
Re^5: Why can't I use s///by linuxer (Deacon)
|on May 08, 2013 at 21:52 UTC||Need Help??|
What do you mean with "does not work"?
Any errors? Which ones? Which messages? Any warnings? Which ones? Please be more specific with your error descriptions.
Spend some spaces, so you can visually separate inline comments from code, this may help to better see the "error"...
Your are printing a list of items:
And the print is done, as the semicolon behind my $text = "...path" terminates print's argument list.
The final $cgi->p($text); is executed in void context and therefor not printed!
Watch out where your commas and semicolons are!
But apart from the technical issue:
Why do you want to mix printing and (initializing and ) processing data?
Better do it step by step:
Although one could mix it, I don't think it's a good idea to do so.
Keep it the way as your first example shows it (but spend some spaces as well).
edit: fixed ordered list