Printer Friendly Version
Email this thread to a friend
|
Featured Web Site Template |
|
Reflects user activity within the last 5 minutes
|
|
| Member |
Message |
seizure386
Joined: Jan 28, 2005
# Posts: 8
|
Posted: 2005-Jun-08 17:33
I'm using the Perl language to change the format of some documents automatically. I need the program to loop through all of the .cpp files in a directory. I think the 'seek' function would be a way to do it, but i can't get 'seek' to cause the program to loop properly. If anyone can help with seek, or if anyone has a better way to accomplish this loop, please help!
Thanks
|
 |
seizure386
Joined: Jan 28, 2005
# Posts: 8
|
Posted: 2005-Jun-08 19:15
I think i'm a little closer, i've given up on seek and am instead using this at the beginning of my code...:
$dir = "C:/home sean/Umbra4/umbra/umb/";
opendir(INPUTDIR, "$dir" ) or die "can't opendir $dir: $!";
@files = grep(/.cpp$/, readdir(INPUTDIR));
foreach $file (@files) {
|
 |
You are not permitted to post messages in this forum or topic, because of one or more of the following reasons:
- You have not yet logged in, or registered properly as a member
- You are a member, but no longer have posting rights.
- This is a private forum, for which you do not have permissions.
If you are a recent member, it's possible that you simply have not yet confirmed your account. Please
check your email for a message entitled 'JimWorld Forums: Confirm Your Account' and follow the instructions
contained within.
If you cannot find this message, click here to Re-Send it.
|
If you are still experiencing problem, please read the
Login Assistance
Article for some advice on what may be causing your login not to work properly.
|
Switch to Advanced Editor and ...
Create a New Topic
or Reply to this Thread
|
|