Printer Friendly Version Print this thread
Email this thread to a friend eMail this thread to a friend
Featured Web Site Template

Hundreds More at Free Site Templates.com!

Web Site Partners
Sponsored Links
Jet City Software
 
Whos Here ?
Reflects user activity within the last 5 minutes
Moderator(s): Prowler, jcokos
Member Message

seizure386
Joined: Jan 28, 2005
# Posts: 8

View the profile for seizure386 Send seizure386 a private message

Posted: 2005-Jun-08 17:33
Edit Message Delete Message Reply to this message

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

View the profile for seizure386 Send seizure386 a private message

Posted: 2005-Jun-08 19:15
Edit Message Delete Message Reply to this message

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:
  1. You have not yet logged in, or registered properly as a member
  2. You are a member, but no longer have posting rights.
  3. 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

New posts Forum is locked
© 1995  ·  iWeb, Inc  ·  DBA JimWorld Productions