codetoad.com
  ASP Shopping CartForum & BBS
  - all for $20 from CodeToad Plus!
  
  Home || ASP | ASP.Net | C++/C# | DHTML | HTML | Java | Javascript | Perl | VB | XML || CodeToad Plus! || Forums || RAM 
Search Site:
Search Forums:
  Urgent help required....Write HTML, PHP from Perl code  elangovank at 12:40 on Wednesday, November 29, 2006
 

Hi,

I'm writing a html file from Perl. I have to intialise a PHP variable in the same html code. The code is given below. But it throws an error in the error log while accessing the web page.
---
---
---
print text "<?php $reglink = \"http://www.codetoad.com/"; ?>";
print text "<body bgcolor=#ffffff>\n";
---
---
---

The error is

Global symbol "$reglink" requires explicit package name at /san/sample.pm line 100

Is there any way to fix it...


  Re: Urgent help required....Write HTML, PHP from Perl code  mmarab at 13:39 on Wednesday, November 29, 2006
 

Its because it thinks that $reglink is a variable within the perl code itself. PLace a \ in front of it. Like this:

\$reglink

I hope that is what you ment.

  Re: Urgent help required....Write HTML, PHP from Perl code  elangovank at 14:51 on Wednesday, November 29, 2006
 

Excellent.

It works after escaping as you said

Thanks a lot.








CodeToad Experts

Can't find the answer?
Our Site experts are answering questions for free in the CodeToad forums
//








Recent Forum Threads
•  Re: Problem with concatenation
•  how to genrates the crystal report by sending a id at runtime
•  help me
•  pls help me with this..
•  Re: Security - Code verify
•  Job @ EarlySail
•  Job @ EarlySail (perl)
•  IPC problem
•  Re: import contacts of msn/yahoo


Recent Articles
ASP GetTempName
Decode and Encode UTF-8
ASP GetFile
ASP FolderExists
ASP FileExists
ASP OpenTextFile
ASP FilesystemObject
ASP CreateFolder
ASP CreateTextFile
Javascript Get Selected Text


© Copyright codetoad.com 2001-2007