Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: searching a file

by Fletch (Bishop)
on Jan 14, 2004 at 16:52 UTC ( [id://321306]=note: print w/replies, xml ) Need Help??


in reply to searching a file

It'll always fail unless the username in question is on the first line because that's what you've written. You want to look at all the lines, but if any line doesn't match you're exiting. What you want to do is last out of the while loop if you find a match and to use a flag in a conditional after the while loop's done.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (3)
As of 2024-04-19 01:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found