go ahead... be a heretic | |
PerlMonks |
Re: Assigning Variables to String Elementsby GrandFather (Saint) |
on Dec 07, 2013 at 10:31 UTC ( [id://1066115]=note: print w/replies, xml ) | Need Help?? |
There are two things that make it hard to provide a good answer for you. First, you seem to be writing C in Perl. That we can cope with and we can help you take advantage of Perl to clean up your code, but the bad side effect is that declaring all your variables up front makes it very hard to know what their true scope is. The second and more significant problem is that we don't actually know what you are trying to do. You don't give us any sample data. In fact you seem to be going out of your way to obscure what your data actually looks like. I'm fairly sure your real data isn't "characters", but is in fact "numbers" because your manipulations just don't make sense otherwise. It would help us a lot to help you if you gave some sensible sample data and some sensible looking expected output. You might like to use the following Perlish script based on what your sample code seems to be doing and, if it doesn't solve your problems, revise it to demonstrate where your problems are.
Prints:
True laziness is hard work
In Section
Seekers of Perl Wisdom
|
|