Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: Read through directory and return matched data

by Cristoforo (Deacon)
on Nov 10, 2010 at 01:22 UTC ( #870465=note: print w/ replies, xml ) Need Help??


in reply to Read through directory and return matched data

my $acct_number = <STDIN>;

It is not matching because you haven't chomped $acct_number to remove the newline.

chomp(my $acct_number = <STDIN>);

Update: It appears that 'NAME' and $acct_number are on the same line (in your sample data). So when you set $flag1, you should test for '$acct_number' on the same input line. Then you would have a matching record (in addition to removing the newline from $acct_number. :-)


Comment on Re: Read through directory and return matched data
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (6)
As of 2014-09-19 03:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

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











    Results (129 votes), past polls