Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: substr Rampage

by Sidhekin (Priest)
on Sep 17, 2007 at 09:41 UTC ( #639371=note: print w/ replies, xml ) Need Help??


in reply to substr Rampage

substr($record, $FifthCollumEnds, $SixthCollumEnds-1);

Without reading your code, it looks like you are misunderstanding the substr syntax. The third argument is supposed to be length, but what you are passing looks like an end offset.

If I read that right, you might try:

substr($record, $FifthCollumEnds, $SixthCollumEnds-$FifthCollumEnds);

Still looks like an off-by-one error waiting to happen though.

print "Just another Perl ${\(trickster and hacker)},"
The Sidhekin proves Sidhe did it!


Comment on Re: substr Rampage
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (11)
As of 2014-12-23 02:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

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





    Results (133 votes), past polls