Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: Why SprintF?

by donarb (Beadle)
on Jan 27, 2006 at 18:17 UTC ( #526037=note: print w/replies, xml ) Need Help??


in reply to Why SprintF?

You should know that perl is a general purpose language. So you'll see many functions in perl that have nothing to do with creating web pages. But because perl excels at processing text, it excels at creating web pages.

In addition, you should know that using printf may not be the most efficient way of creating web pages. From the context of your question, it sounds like you are spitting out little pieces of HTML.

More advanced systems collect all of those little pieces of HTML, format and then print the page all at once (this is where sprintf can help). This has benefits when you start querying databases to build your page. If you start printing out HTML before all of your page processing completes, what happens when you run into a serious error further down the page? You can't pull back the parts of the page you've already printed.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://526037]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (2)
As of 2022-01-19 07:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In 2022, my preferred method to securely store passwords is:












    Results (55 votes). Check out past polls.

    Notices?