Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re^2: Pattern Searching

by aseee (Novice)
on Nov 10, 2012 at 10:47 UTC ( [id://1003243]=note: print w/replies, xml ) Need Help??


in reply to Re: Pattern Searching
in thread Pattern Searching

I appreciate your efforts in solving the problem. your code have the same problem i.e. works well for the 1st iteration, foreach loop of $string then it shows only first letter of patterns for rest of strings.

Replies are listed 'Best First'.
Re^3: Pattern Searching
by marquezc329 (Scribe) on Nov 10, 2012 at 11:20 UTC

    I figured as much. The snippet wasn't intended to debug, merely to give an example rewrite implementing some of the stylistic points I mentioned.

    I'd suggest taking a look at perldebtut. Using the Perl debugger to step through your code may help you visualize the flow of your program through each control structure, and figure out where it may be exiting prematurely on the 2nd and 3rd iteration.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (4)
As of 2024-04-25 15:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found