in reply to creating a text file at run time and writing to it.
#!/usr/bin/perl -w use strict; open (NAMES, "names.txt") or die "Failed to read names: $!"; while my $name (<NAMES>) { chomp $name; open(OUT, ">$name.txt") or die "Failed to write $name.txt: $!"; print OUT " hellow"; close OUT; } close NAMES;
-- zigdon
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: creating a text file at run time and writing to it.
by zigdon (Deacon) on Jul 20, 2006 at 12:08 UTC | |
A reply falls below the community's threshold of quality. You may see it by logging in. |