
KevinR
Veteran

Apr 11, 2009, 9:12 AM
Views: 1198
|
Yes, but where do you add in the "/" before the names of the directories under root? I just didn't see any other way to do that except a loop. If you have an array and wanted to add a / to the front of each element:
Shift removes the first element of an array. This isn't a big deal, because that element is in $_, so I can still use it, but there is no need to keep storing it after that point. Lets look at what happens
@array = (1 .. 10); foreach (@array) { shift(@array); print; } Note what gets printed: 13579 -------------------------------------------------
(This post was edited by KevinR on Apr 11, 2009, 9:12 AM)
|