Alternately, if you don't think it's worth a subroutine, you could perform all the operations at one go by taking advantage map, like so:
The map function sets $_ to be an alias to each value in the list. When you change $_ you change the list. Therefore, you don't need to assign back to the original variables - they are already changed.
If you don't assign back to the original variables then map will be in void context. If you find map in void context to be troubling (as I do), you can use do and foreach instead, as follows:
do { s/\</\</ig; s/\<.*?>//ig; } foreach($sndrNme, $rcvrNme, $subject, $ccrcNme);
In reply to Re^2: How to add attachments to an email using cgi/perl
by ig
in thread How to add attachments to an email using cgi/perl
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |