greymoose has asked for the wisdom of the Perl Monks concerning the following question:
$storyfile is the full path and filename for the new file, $filename is the filename on its own and $story is the content for the file. All of these are defined earlier in the script.#Save the story to file open STORY,">$storyfile"|| die "Could not write to $filename\n"; printf STORY $story; close (STORY);
and I get this:open(STORY,$storyfile)|| die "Could not write to $filename\n"; printf STORY $story; close (STORY);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Having trouble creating a text file
by davido (Cardinal) on May 05, 2007 at 05:27 UTC | |
by greymoose (Beadle) on May 06, 2007 at 23:56 UTC | |
by davido (Cardinal) on May 08, 2007 at 04:28 UTC | |
by greymoose (Beadle) on May 08, 2007 at 05:47 UTC | |
by davido (Cardinal) on May 09, 2007 at 04:18 UTC | |
|
Re: Having trouble creating a text file
by FunkyMonk (Bishop) on May 05, 2007 at 08:42 UTC | |
by greymoose (Beadle) on May 06, 2007 at 23:59 UTC | |
|
Re: Having trouble creating a text file
by roboticus (Chancellor) on May 05, 2007 at 12:24 UTC | |
by greymoose (Beadle) on May 07, 2007 at 00:00 UTC |