> Hi,
>
> I am reading all the files in a directory through readdir....Now after
> reading each of the file and processing it, I want to write their output
> one
> by one to a different
> directory.
>
> Please suggest on how can this be done?


What have you tried? Your question does not say what exactly you are
trying to do.

1. Specify the directory that you want to write to, eg,

  my $write_dir = '/where/ever/';

2. Open a file for each file you are processing

  open (my $OUT_FILE, ">", "$write_dir$file_I_am_processing) or die ....

3. print it out

  print $OUT_FILE "Whatever it is";

4. Close the file (otherwise you might run out of resources if you have
1000s of files)

4. close $OUT_FILE;




HTH


Owen



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to