Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re^2: substr in nested foreach loop

by sarani (Sexton)
on May 23, 2006 at 04:02 UTC ( [id://551075]=note: print w/replies, xml ) Need Help??


in reply to Re: substr in nested foreach loop
in thread substr in nested foreach loop

There are whitespaces on either side, and length gives 57. The file is formatted such that except for the last line, each line has that many chars. :) That's the cause of my confusion.

Replies are listed 'Best First'.
Re^3: substr in nested foreach loop
by Jasper (Chaplain) on May 23, 2006 at 08:50 UTC
    Yeah but no but yeah.

    If you stick a warning before each substr operation giving the length of the string and which characters it's trying to find, I bet you'll trace the problem pretty quickly.
      Jasper: Yeah, I got it. *sheepish grin* End of line char at the end of file. Thanks. :)

      Oh, and a couple of places where the file formatting was irregualr because of overwriting. *feels dumb*

      On the positive side, I've learnt more in the time it took me to read this thread and attempt to implement all of the suggestions (I did) than I did while trying to debug all by myself...So I owe all the Monks who were kind enough to reply a huge thanks.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (4)
As of 2024-03-29 15:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found