in reply to Re^2: counter of files? something else?
in thread counter of files? something else?

I want the files counted as I think of it as the only way to get different $carboxyl entries. All I want is just a number, from 1 to whatever, next to my $carboxyl entry, so that I will be able to tell the files apart.

This number doesn't have to be associated with the files, it doesn't have to be a file counter, it just has to be consecutive and different every time, for each of the resulting pdb files.

It's just because I'm a newbie that I thought that associating my goal with a file counter would make more sense and would be easier to implement.

$atomcount and @atom aren't unaccounted for, they're just further up in my script (sorry about that, I didn't know how to include a concise part without copying the whole thing). Also, I'm opening the pdb files and printing coordinates (x,y,z) in them, from the files that are already open (again, opened further up in my script and these are the files of the foreach loop)

Thank you (all) for you help. I'll try your suggestions and update you, hopefully I'll get it right - at least in my mind or on paper.

Update: Yes, pdb is protein data bank files. Although I'm an idiot and instead of pdb it should read gro, as I changed to gro files (and thus the format is wrong for pdb files). I'm really sorry about that, thankfully it doesn't change my question though so not a disaster (I'm embarrassed)

  • Comment on Re^3: counter of files? something else?