those "." and ".." directories
Ok, I know most of us have seen them, and a majority of you probably know what they are for. Well I have no idea, and truthfully I don't want to know. I just don't want my script to show them. So kinda of search perimeter can I use to exclude these from from the directory list?
I have tried :
if ($item =~ m/./)
But that don't work, it seems to match every folder in the directory.
Any other ideas would be helpful.
VulKen
Nothing Witty To Say
Pimpin like a pimp with an electrofied pimpin machine!
Ken Elliott posted this at 14:48 — 29th August 2000.
They have: 358 posts
Joined: Jun 1999
Nevermind I figured out a way to accomplish this. I just put all the folders in an array, sorted them and then shifted the first two elements out of it. (. & ..).
But thanks for looking!
VulKen
Balls To The Wall Baby
Pimpin like a pimp with an electrofied pimpin machine!
Orpheus posted this at 21:24 — 29th August 2000.
They have: 568 posts
Joined: Nov 1999
if ($item =~ m/\./)
Vorm posted this at 00:57 — 30th August 2000.
They have: 62 posts
Joined: May 2000
Hahaha, I bet your pissed to missed that Vulken! Hehehehe...
Ken Elliott posted this at 17:45 — 1st September 2000.
They have: 358 posts
Joined: Jun 1999
Actually I think I tried that too. It excluded all of the folders.
VulKen
But I'm always Pissed
Orpheus posted this at 21:41 — 1st September 2000.
They have: 568 posts
Joined: Nov 1999
try to use eq instead of a regular expression
i tried to do the same thing a while ago and i think that worked.
Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.