Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: Storing regex values in an array and processing the array

by Laurent_R (Parson)
on Jun 07, 2013 at 18:52 UTC ( #1037731=note: print w/ replies, xml ) Need Help??


in reply to Storing regex values in an array and processing the array

Not entirely sure of what you want to do, but your program certainly does not do what you want.

Basically, your program reads an input file but does not use it, except as a line count in a sense: for each line in the input file, your program prints the regular expressions that you have stored in the @patterns array. But, as already pointed out, this array contains only one pattern, so that in the end, you are basically only printing the pattern count times, count being the number of lines in the input file.

EDIT: fixed typo.


Comment on Re: Storing regex values in an array and processing the array
Re^2: Storing regex values in an array and processing the array
by diamondsandperls (Beadle) on Jun 07, 2013 at 18:58 UTC
    sorry i should have stated there are many regex matches that will eventually be added is the plan im still not sure how to formulate this

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (7)
As of 2014-12-28 06:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

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





    Results (178 votes), past polls