Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: Re: How to find empty in empty

by petral (Curate)
on Nov 19, 2002 at 15:44 UTC ( #214155=note: print w/ replies, xml ) Need Help??


in reply to Re: How to find empty in empty
in thread How to find empty in empty

Um, '+' means at least one (and you don't need the box): ! /^\s*$/
Anyway, it's even easier just to check for a non-space: /\S/
But, as long as we're at it, why not accept only well-formed lines:

if ( /^(\w+)\s+([\d.]+)/ ) { ($names[$l],$versions[$l])=($1,$2); ++$l; else { . . .

  p


Comment on Re: Re: How to find empty in empty
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (10)
As of 2015-07-08 06:41 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 (94 votes), past polls