I guess its because no-one knows what i'm tring to do because my code is so rudimentary. Previously I was using hashes, then was told to instead use arrays, so I did that with limited success. Almost had it working in fact, then it collapsed. I'll go back to hashes because I DO NEED the named indexes. I'll fully read that next recommended section a couple times re hashes

Do you mean instead $currVar = \@myarray;?

Using the @ was causing errors for me

What do you expect this to do? for ($i = 1; $i <= $depth; $i++) { $currVar=\@currVar[$arrayKey[$i]]; }

This is supposed to make the reference to the variable according to depth, so I can then enter a value. @arrayKey contains all of the variable names, so the loop just inserts them in order, creating the reference

if($line =~ /^\s{0,4}\<\/(.*)\>/) {

The data this code will receive has 0-4 spaces depending on the depth of the value. I'm sure there's a better way to do it, but for now it works

I know you think that's going to be more work, but it's not. It's really not

If I only use mods, i'd most certainly succeed. But i'm trying to learn HOW to do this at the same time. I've bashed my head into walls numerous times, but the picture is becoming clearer, more and more reading, more attempts, days of failed code attempts. More recommendations on things to read, subtle improvements each time(Note: my server admin is a cow and only allows some mods. My other server only allows other mods, I need a new server)

As always, thank-you for your input *bow*


In reply to Re^2: Working through it... by Inexistence
in thread Working through it... by Inexistence

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.