dude, you sorta missed it there... it's not actual paths im messing with, i need to take 1 string (a directory path) and split it into a bunch of strings, 1 for each directory in the path. and they have to retain their full path name. i know how to use hashes but dont need to since an array is the best way for me to go through all the elements (paths) in the array. so, i was thinking maybe appending to a separate string the last path that worked and work my way up, but i tried that and now my script just times out on my webpage and on console there are no debugging problems so ugh! this is my idea so far, please someone tell me where i went wrong and how can i make it work?
$oldCOORRDIR ="";
while ($CURRDIR =~ m/\//) {
$COORRDIR = substr($CURRDIR, 0, index($CURRDIR, "/"));
unshift (@dacurdirs, "$oldCOORRDIR/$COORRDIR");
$oldCOORRDIR = $COORDIR;
$CURRDIR = substr($CURRDIR, index($CURRDIR, "/"));
}
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: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.