Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

perl tips 3

by Mungbeans (Pilgrim)
on Jul 27, 2001 at 13:58 UTC ( [id://100264]=monkdiscuss: print w/replies, xml ) Need Help??

From daily-tips@perl.org. Might be worthwhile adding this as a resource to the learning perl section on.

Thoughts?

We are at the Perl Conference in San Diego having lots of fun and learning lots of cool new stuff. Be sure to follow the coverage at http://use.perl.org/ and http://www.perl.com/ :-) On to the tip: Anyone have seen code like print "<a href=\"http://$url/\">$site</a> (\"$title\")"; Now, it is quite annoying to read all those \'s, so you would think there is a better way. Well, there is! :-) The above line could be written as print qq[<a href="http://$url/">$site</a> ("$title")]; So instead of using " as the quote operator we used qq[ and ] to end the quote. You can also use for example qq{ (or any other form of "brackets"), li +ke print qq{...}; Like "text" can be substituted with qq[text] you can use a single q for ', so a confusing statement like '\'daily-tips-subscribe@perl.org\'' can be written as q['daily-tips-subscribe@perl.org'] instead. For more information, run "perldoc perlop" and search for "Quote and Quote-like Operators". To unsubscribe: mail daily-tips-unsubscribe@perl.org To subscribe: mail daily-tips-subscribe@perl.org Or visit: http://learn.perl.org/tips/ Comments, suggestions? Send them to ask@perl.org.

"The future will be better tomorrow." ... from the collected wisdom of George W Bush.

Edit Masem 2001-07-27 - CODE Tags

Replies are listed 'Best First'.
Re: perl tips 3
by scain (Curate) on Jul 27, 2001 at 17:18 UTC
    This is a good idea. One could even envision a "quick tips" nodelet.

    Scott

    Update: On rereading your post, it became clear to me that you were not suggesting anything of the sort. Oh well, that's what I get for posting before my first Coke of the morning. Nevertheless, a quick tips nodelet is still a good idea :-)

      Well without taking up any of vrooms time we could:
      • Start up a Quick Tips node
      • Reply to it with each new mail
      • Add it to our personal nodes
      • Scan it from time to time...

      Which would work except I've lost the first two perl tips :-)

      "The future will be better tomorrow." ... from the collected wisdom of George W Bush.

        Hmmm. If you are advocating just copying the text, we should be carefull, as we might be violating somebody's copyright. Does anyone know anything about the ownership of the contents of this mailing list?

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (8)
As of 2024-03-28 12:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found