I don't find anything particularly irritating about that with the exception of its formatting. It really isn't that hard to line up the assignment operators.
You've already gotten a few good reasons to do it. I might add readability to the list. Especially if the value is used repeatedly, it is a lot easier to quickly read $real_name than $q->param('real_name') in a line full of other code.
Another reason might be the desire to use string interpolation. I think
is much nicer thanprint "Hello $real_name!\n";
is. Also, with <<HERE documents, using variables becomes a necessity¹.print 'Hello ', $q->param('real_name'), "\n";
1. That is, if you want to avoid ugly constructs such as the one Aristotle mentions in his reply. ;-)
-sauoq "My two cents aren't worth a dime.";
In reply to Re: CGI and why?
by sauoq
in thread CGI and why?
by Sifmole
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |