Re: Perfecting index.pl some more!
- From: Nikos <hackeras@xxxxxxxxx>
- Date: Sat, 30 Apr 2005 18:27:33 +0300
Tassilo v. Parseval wrote:
By using 'for $data', $data gets aliased to $_ which is the default variable that s/// and tr/// act upon. By using 'for' as a statement-modifier (that is: in postfix notation) no block is needed which would normally be the case if you wrote:
for ($data) { s/\n/\\n/g; s/"/\\"/g; tr/\cM//d; }
Aaah, now i get it! This i can understnad thank you.
The reason iam writing this is because i have to pass the variable $data to the upcoming javascript code:
print <<ENDOFHTML; <html><head><title></title> <script type='text/javascript'>
var textToShow = "$data";
{snip more code]$data is supposed to hold all the contents of the user_selected_file that he previously choosed to see from a drop down menu:
If i dont then substitune that chars then js wont work and the file will not be displayed at all.
you can see how js is functioning at my home webpage http://www.nikolas.tk
With your help the index.pl script is getting better & better and i thank you all for that. :-)
.
- References:
- Perfecting index.pl some more!
- From: Nikos
- Re: Perfecting index.pl some more!
- From: Tassilo v. Parseval
- Re: Perfecting index.pl some more!
- From: Nikos
- Re: Perfecting index.pl some more!
- From: Tassilo v. Parseval
- Perfecting index.pl some more!
- Prev by Date: Re: multiples ifs
- Next by Date: Re: About formatting
- Previous by thread: Re: Perfecting index.pl some more!
- Next by thread: Alternatives to sourceforge
- Index(es):