Hi Graham,
Graham Saathoff wrote:
Is this right? Any suggestions for how to build something like this?
Well, you have the right idea in that you're planning out what you are
doing. In general, if you have hundreds of files, what you should do
depends on how big they are. You mentioned making a copy and adding a
filename; if they are large, that won't be very feasible. If we are
talking about 500 files, making a copy will mean you'll end up with 1,000.
But there are many ways to do things in Perl and, in my humble opinion,
it is better if you start off with some code of your own that reflects
how you would solve the problem and build up on it until you get stuck.
It is better than someone giving code to you because if you want to
change it a little, you wouldn't know where to start. Because whatever
anyone writes, the first try won't be the final one -- you'll refine it
to make it better or faster until you are satisfied. Your first try
might give you 500 additional files...but from trying, you'll also
understand the comments people give you better.
For starters, what you should do is grab a book from the library or read
some basic tutorial on Perl -- see, for example, the Perl Cookbook for
some recipes to start you off:
http://www.unix.com.ua/orelly/perl/cookbook/index.htm .
On the command line, you can use "perldoc" to read Perl documentation.
Or, go to here:
http://perldoc.perl.org/
And make sure you turn on "strict" and "warnings" in your script:
http://perldoc.perl.org/warnings.html
http://perldoc.perl.org/strict.html
You'll get an ear-full from anyone you ask for help if you don't do
this...especially on this mailing list... :-)
Ray
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/