Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: Sorry message

by sutch (Curate)
on Apr 03, 2001 at 16:10 UTC ( #69270=note: print w/ replies, xml ) Need Help??


in reply to Sorry message

In the future, you may want to use some HTML along with <code> tags to format the content of your question.

You need a variable to track whether a match was found. I recommend setting it to 0 before the while loop, then incrementing it for each match. After the while loop, if the variable is false (still equal to 0) then print your "not found" message. This technique has the added benefit of providing you with the number of matches.


Comment on Re: Sorry message

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (4)
As of 2014-09-21 23:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (176 votes), past polls