04-29-2008
transforming small javascript into perl
Quote:
<script type="text/javascript">
var param="$function"
if (param=="yes")
{
document.write("open")
}
else
{
document.write("closed")
}
</script>
I need to transform this small javascript into a perl. So then when I need to use it I can call $something, instead of using this javascript.
Could someone help me archive this?
8 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
How will i convert a file
<LREC><L:EPOCH>1198331268.553</L:EPOCH><LDATE>10-12-07</LDATE><L:SERVER>NONE</L:SERVER><L:PORT>NONE</L:PORT><LTIME>13:47:48.553</LTIME><LTEXT>dnvdmxk</LTEXT></LREC>... (3 Replies)
Discussion started by: anju
3 Replies
2. UNIX for Dummies Questions & Answers
Hello all,
Am trying to include a onChange java script to my perl CGI application which uses POST method to upload files to file_server
This is how I embedded javascript in the perl code that renders CGI application
print qq|
<script type="text/javascript" src="display.js">
</script>... (4 Replies)
Discussion started by: matrixmadhan
4 Replies
3. Shell Programming and Scripting
Hi all
In input file I have records like this:
0,1,0,87,0,0,"6,87","170,03",0,"43,5",0,0,0,0,"6,87","126,53" and in output file I need that these records transforms in :
0 1 0 87 0 0 6,87 170,03 0 43,5 0 0 0 0 6,87 126,53 Could you help me in this case? Please (13 Replies)
Discussion started by: shizik
13 Replies
4. UNIX for Advanced & Expert Users
Hi all. I would like to create a program that converts psmf file format (PSMF - MultimediaWiki) to ogv (Ogg - Wikipedia, the free encyclopedia).
I know C++ and I worked with BMPs (so I can understand a simple file system like the BMP header is) but I didn't touch any kind of sound/video file... (1 Reply)
Discussion started by: lilezek
1 Replies
5. Shell Programming and Scripting
i am new to Perl CGI Object oriented.
I want to use some java script in my Perl CGI but i am not able to do that.
I am using Submit button then via param() i am getting all field parameters.
But i want to validate all fields first then i want to move. But Use of Java script, i don't know (1 Reply)
Discussion started by: Navrattan Bansa
1 Replies
6. Shell Programming and Scripting
Hi,
I would like to call the below perl web service from javascript .Any help would be appreciated.I am new to web services.Please do the needful.
Server Program(Perl Web Service)
#!/usr/bin/perl
use lib '/usr/lib/perl5/5.8.8/SOAP-Lite-0.65_3/lib';
use SOAP::Transport::HTTP;
use Demo;... (3 Replies)
Discussion started by: liyakathali
3 Replies
7. Programming
Dear All
I would like to transform data from one format to another format.
my Input:
0 0 1
0 1 0.308
0 2 0.554
0 3 0.287
output:
Z (0,0)= 1
Z (0,1)=0.308
Z (0,2)=0.554
Z (0,3)=0.287 (2 Replies)
Discussion started by: bala06
2 Replies
8. UNIX for Dummies Questions & Answers
Lets say for instance I have this data within a file named transform
xxx#yyy@zzz and I want it to be in the format ofZZZ xxx-yyy
How do I go about doing this? (3 Replies)
Discussion started by: l3monz
3 Replies
LEARN ABOUT DEBIAN
html::packer
HTML::Packer(3pm) User Contributed Perl Documentation HTML::Packer(3pm)
NAME
HTML::Packer - Another HTML code cleaner
VERSION
Version 1.004001
DESCRIPTION
A HTML Compressor.
SYNOPSIS
use HTML::Packer;
my $packer = HTML::Packer->init();
$packer->minify( $scalarref, $opts );
To return a scalar without changing the input simply use (e.g. example 2):
my $ret = $packer->minify( $scalarref, $opts );
For backward compatibility it is still possible to call 'minify' as a function:
HTML::Packer::minify( $scalarref, $opts );
First argument must be a scalarref of HTML-Code. Second argument must be a hashref of options. Possible options are
remove_comments
HTML-Comments will be removed if 'remove_comments' has a true value.
remove_newlines
ALL newlines will be removed if 'remove_newlines' has a true value.
do_javascript
Defines compression level for javascript. Possible values are 'clean', 'obfuscate', 'shrink' and 'best'. Default is no compression for
javascript. This option only takes effect if JavaScript::Packer is installed.
do_stylesheet
Defines compression level for CSS. Possible values are 'minify' and 'pretty'. Default is no compression for CSS. This option only
takes effect if CSS::Packer is installed.
no_compress_comment
If not set to a true value it is allowed to set a HTML comment that prevents the input being packed.
<!-- HTML::Packer _no_compress_ -->
Is not set by default.
html5
If set to a true value closing slashes will be removed from void elements.
AUTHOR
Merten Falk, "<nevesenin at cpan.org>"
BUGS
Please report any bugs or feature requests through the web interface at https://github.com/nevesenin/html-packer-perl/issues
<https://github.com/nevesenin/html-packer-perl/issues>. I will be notified, and then you'll automatically be notified of progress on your
bug as I make changes.
SUPPORT
You can find documentation for this module with the perldoc command.
perldoc HTML::Packer
COPYRIGHT & LICENSE
Copyright 2009 - 2011 Merten Falk, all rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
SEE ALSO
HTML::Clean
perl v5.14.2 2012-02-20 HTML::Packer(3pm)