Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
yes, i think in this case regex is too much, as it's only a fixed parameter substitution. regex can become easily overused. And when you use a regex you introduce pitfalls. I always go for simple substitution or other string operations first. substr and index functions come in very handy.
regards testing smtp...just in case this is not common knowledge, you can telnet to port 25 on your smtp server and issue commands to send emails, just as a module would. it's great for testing the viability of a particular idea/method...and then you can see if a module can do it or needs some tweaking. For example, you would see that you can send multiple separate emails during one session/connection to smtp server. Mind you, setting up a massively parallel process to send emails isn't going to change much on the smtp server end, which serves a FIFO queue anyway. And using one connection/send/disconnection per email is useful as a unit of measure that one email send completed. I would argue that unless your program needs hours to complete (the bulk email send) that you should just send them one by one. it's also good not to hog/thrash the mail server.
anyway, hope your project is progressing well.
the hardest line to type correctly is: stty erase ^H

In reply to Re^4: How to eval an array element in regex's substitution by aquarium
in thread How to eval an array element in regex's substitution by pysome

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (8)
As of 2024-04-23 12:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found