zdog has asked for the wisdom of the Perl Monks concerning the following question:
#!/usr/bin/perl -w use strict; my $name = "Zenon Zabinski"; my $date = "072800"; open(FILE, "folder/${name}/${date}.txt"); print FILE "test"; close FILE;
... and it doesn't work. I thought that maybe it couldn't open a file with a number for a name so I changed the value of $date to "date", but that didn't help.
Using a space in the path didn't seem to be a problem when I put Zenon Zabinski directly into the path, but I need it to come from a variable.
Sooooooooo, what is the problem??
Thanks.
Zenon Zabinski | zdog | zdog7@hotmail.com
P.S. Wups! I almost forgot. I keep getting the following warning when I run this:
print() on closed filehandle main::FILE at test.pl line 10.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
RE: More File/Directory Trouble
by autark (Friar) on Jul 29, 2000 at 01:22 UTC | |
by zdog (Priest) on Jul 29, 2000 at 01:29 UTC | |
|
RE: More File/Directory Trouble
by mikfire (Deacon) on Jul 29, 2000 at 05:31 UTC | |
by Fastolfe (Vicar) on Jul 29, 2000 at 19:48 UTC | |
by Fastolfe (Vicar) on Jul 29, 2000 at 19:53 UTC | |
by Fastolfe (Vicar) on Jul 29, 2000 at 19:50 UTC | |
|
Re: More File/Directory Trouble
by athomason (Curate) on Jul 29, 2000 at 01:40 UTC | |
|
RE: More File/Directory Trouble
by Anonymous Monk on Jul 31, 2000 at 21:25 UTC |