Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Writing scipt to a file from a script

Status
Not open for further replies.

mediais

Programmer
May 15, 2000
6
US
In attempting to build an installer I want to install numerous perl scripts from one perl script installer. Keep getting error 'can't modify constant item in scalar assignment' and for the life of me I can't find why.<br><br>short code example:<br><br>open (ADMIN,&quot;&gt;admin.cgi&quot;) ¦¦ die &quot;Can't write new file admin.cgi: $!\n&quot;;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;flock(ADMIN,2);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;print ADMIN = &quot;\&035\;\!/usr/bin/perl\n&quot;;<br>[removed other lines]<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;close (ADMIN);<br><br>no matter what is on the first print line it still returns the same error. But if nothing is there it will create a nice empty admin.cgi .<br><br>help?<br><br>thanks<br><br>lee<br> <p>Lee Hempfling<br><a href=mailto:lkh@mediais.com>lkh@mediais.com</a><br><a href= Corporation</a><br>Complex problems require simple solutions.
 
Hi Lee,<br><br>Your line<br><br><FONT FACE=monospace><b>print ADMIN = &quot;\&035\;\!/usr/bin/perl\n&quot;;</font></b><br><br>needs to be<br><br><FONT FACE=monospace><b>print ADMIN &quot;\&035\;\!/usr/bin/perl\n&quot;;</font></b><br><br>You just had an '=' in there.<br><br> <p>Mike<br><a href=mailto:Mike_Lacey@Cargill.Com>Mike_Lacey@Cargill.Com</a><br><a href= Cargill's Corporate Web Site</a><br>Please don't send me email questions without posting them in Tek-Tips as well. Better yet -- Post the question in Tek-Tips and send me a note saying "Have a look at so-and-so in the thingy forum would you?"
 
Mike,<br>Thank you! It did the trick. I owe you gratitude for a week.<br>But... wanna go for two weeks?<br><br>it seems the server has now taken an attitude from something<br>I'm doing in this print process.<br><br>access denied now happens. it has not before.....<br><br>oh the conundrums of life<br><br>lee <p>Lee Hempfling<br><a href=mailto:lkh@mediais.com>lkh@mediais.com</a><br><a href= Corporation</a><br>"The meaning of life is to have no ending, as<br>
a life with an ending has no meaning."
 
Hi Lee,<br><br>I'll go for the two weeks &lt;smile&gt; but I need a bit more information first.<br><br> <p>Mike<br><a href=mailto:Mike_Lacey@Cargill.Com>Mike_Lacey@Cargill.Com</a><br><a href= Cargill's Corporate Web Site</a><br>Please don't send me email questions without posting them in Tek-Tips as well. Better yet -- Post the question in Tek-Tips and send me a note saying "Have a look at so-and-so in the thingy forum would you?" My home email is michael.j.lacey@ntlworld.com&lt
 
OK two weeks it is.. :cool:&nbsp;&nbsp;<br><br>But ya gotta work hard for the time... ;-)<br><br>Here is my code... I'm stuck as it only responds with<br>a denial<br><br># script snippit sent in email, not public material yet<br><br>Thank you for your help.<br>Lee <p>Lee Hempfling<br><a href=mailto:lkh@mediais.com>lkh@mediais.com</a><br><a href= Corporation</a><br>"The meaning of life is to have no ending, as<br>
a life with an ending has no meaning."
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top