TrinityInfinity has asked for the wisdom of the Perl Monks concerning the following question:
@adjNum captures the string of numbers I want to look at - in this case it cuts off the STPC and leaves me with 0001. However, this only works for 0001-0009, when I get to 0010, it starts back at 0, and thusly screws me up. I've tried scalar(@adjNum) to kinda force the 0001 into a single number, but that also doesn't work properly after 9.if ($currNumber =~ /^($product)./) { @currNumber = split //, $currNumber; @product = split //, $product; $prodLength = @product; @adjNum = splice(@currNumber,$prodLength); }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Split & Splice Confusion
by HyperZonk (Friar) on Aug 17, 2001 at 23:30 UTC | |
by TrinityInfinity (Scribe) on Aug 17, 2001 at 23:38 UTC | |
|
Re: Split & Splice Confusion
by runrig (Abbot) on Aug 17, 2001 at 23:34 UTC |