> "Michael Pratt" <[EMAIL PROTECTED]> said:
> How can I open several files with this format sn.????.txt where ???? is 0001
> 0002 so on and so on?
You can use the globbing (shell pattern matching) magic of the <>
operator to get the names of the files. Try this to see how it works.
while (<sn.????>) {
print "$_\n";
}
This prints every filename which matches the glob pattern "sn.????" in the current
directory. I'll leave it as an exercise how you open each of the files.
To only match filenames with numeric extensions, you can get more
sophisticated with the pattern matching. e.g. "sn.[0-9][0-9][0-9][0-9]".
--
Smoot Carl-Mitchell
Consultant
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]