in reply to automatic web query and writing files in a directory
my $basepath = "c:\\foo\\bar"; my $dir = $basepath."\\".$gene."_".$geneid; mkdir($dir, 0755) or die "Failed creating $dir\n"; chdir($dir); #what file are you writing? That is so ambiguous. Let us pretend $st +ring is your file contents and I will make up a filename becuase you +weren't specific about that either. my $file = "baz.txt"; open(OUT, ">>$file") or die "Cannot open $file for writing\n"; print OUT $string; close(OUT);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: automatic web query and writing files in a directory
by Anonymous Monk on Jun 07, 2007 at 21:21 UTC | |
by planetscape (Chancellor) on Jun 08, 2007 at 03:36 UTC | |
by Grundle (Scribe) on Jun 08, 2007 at 16:07 UTC |