freelanceprogrammers.org Forum Index » Perl
variable in file?
Joined: 07 Jul 1999
Posts: 6
variable in file?
I need help really bad. Is there anyway to
open<br>a new file that its name is a variable like if
<br>I have a $i variable = "ryansfile" and I want
to<br>open it can`t I do:<br><br>open
(f,">$i");<br><br>because that isn`t working.<br>can anyone
help?<br><br>Thanks
Joined: 07 Jul 1999
Posts: 4
variable in file?
To my recollection, a syntax like<br>| open (f,
"> $i");<br>should be valid. Consider changing it
to<br>| open (f, "> $i") || die "Can`t open $i for
writing: $!
";<br>so you can see the specific error
message.<br><br>Post more specific information, if you still have this
problem.
All times are GMT
Page 1 of 1
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Freelace Website Designer - Customer web design and software building.
China Wholesale - Electronics Products
Character Studio - Tutorials and Help
China Wholesale - Electronics Products
Character Studio - Tutorials and Help







