Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re^2: perl6 phasers and a 1 liner

by Laurent_R (Canon)
on Feb 13, 2018 at 22:39 UTC ( #1209092=note: print w/replies, xml ) Need Help??


in reply to Re: perl6 phasers and a 1 liner
in thread perl6 phasers and a 1 liner

Another problem is that you have a -ne (i.e. run once for every line) but you use the lines sub in your code, which will immediately give you all lines as one list.
You seem to have missed that the code is using two different files. The OP uses the .lines IO method to read patternFile.txt in the BEGIN block, and the -ne command line option to read searchFile.txt.

Replies are listed 'Best First'.
Re^3: perl6 phasers and a 1 liner
by Anonymous Monk on Feb 14, 2018 at 02:01 UTC
    i was actually referring to the lines sub, not the lines method. both occur in the code, and the part that uses the sub is the one that is the problem.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1209092]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (3)
As of 2018-05-24 19:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?