Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: Pattern Matching

by Crian (Chaplain)
on Nov 19, 2008 at 13:24 UTC ( #724574=note: print w/ replies, xml ) Need Help??


in reply to Pattern Matching

I would suggest you to use strict; and use warnings;.

There are missing the opening " characters in your error handling on opening the file.

If I understand your problem, perhaps grep is the tool you are looking for, not Perl's grep, the one of your operating system.


You can't use the same filehandle 'File' for two different files. And I suggest lexically filehandels.


cnt++; is no Perl construct. I guess you want wto say $cnt++;. Id would be finde, if you would only show us code, that runs without errors and warnings.


Comment on Re: Pattern Matching
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (8)
As of 2014-12-21 06:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (104 votes), past polls