Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: Death to Dot Star!

by Juerd (Abbot)
on Jan 01, 2002 at 06:07 UTC ( #135472=note: print w/ replies, xml ) Need Help??


in reply to Death to Dot Star!

If .* is being used to grab data, or in a regex that's just there to verify if something's correct, it is bad most of the time.

BUT... If s/// is used, .* often is the right choice.

s!^.*/!!


Please don't use [\s\S]* or [\d\D]* etc because someone told you .* is bad. You can use .* if you know it's right. (btw, . doesn't match \n unless /s is used, [\d\D] and friends do match \n).

Summary: if you know what it does, and it does what you want, .* is not bad.

2;0 juerd@ouranos:~$ perl -e'undef christmas' Segmentation fault 2;139 juerd@ouranos:~$


Comment on Re: Death to Dot Star!
Select or Download Code
oops (please delete)
by NodeReaper (Curate) on Jan 01, 2002 at 08:07 UTC

    Reason: (jynx) please reap, this node is symantically null

    For more information on this node visit: this

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (12)
As of 2015-07-06 21:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (83 votes), past polls