freelanceprogrammers.org Forum Index » Perl

variable in file?


View user's profile Post To page top
rpmtech Posted: Wed Jul 07, 1999 7:13 am


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,"&gt;$i");<br><br>because that isn`t working.<br>can anyone
help?<br><br>Thanks
Reply with quote
Send private message
View user's profile Post To page top
Shetan11 Posted: Wed Jul 07, 1999 5:29 pm


Joined: 07 Jul 1999

Posts: 4
variable in file?
To my recollection, a syntax like<br>| open (f,
"&gt; $i");<br>should be valid. Consider changing it
to<br>| open (f, "&gt; $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.
Reply with quote
Send private message
Post new topic Reply to topic
Display posts from previous:   
 

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
Freelace Website Designer - Customer web design and software building.
China Wholesale - Electronics Products
Character Studio - Tutorials and Help