01-21-2020
Hi vgersh99,
Yes, it works perfectly now!
8 More Discussions You Might Find Interesting
1. News, Links, Events and Announcements
LINK:
Unix Manual (man page) pages in HTML
http://www.rt.com/man/
: More then 100 Commands found on a Unix system mannual pages can be obtained/refered here. Good Link.. (1 Reply)
Discussion started by: killerserv
1 Replies
2. Shell Programming and Scripting
Hi i want to ask how can i use perl and find a word in a text file, and also telling that which page doesn't it exist?
Eample: have a 10 pages text file, then i need to find 'Hello' in the file, and show that which page is it contain in.
Output: Hello contains 8 times in page 1, 3, 4, 7, 10... (9 Replies)
Discussion started by: mingming88
9 Replies
3. Shell Programming and Scripting
I am working on an embedded linux router and trying to make a webpage where the user can input a desired number of CPE and have a script update that number on the router. I have a CLI where I can log in and type the following to change that number
echo "20">/proc/net/dbrctl/maxcpe which then... (7 Replies)
Discussion started by: BobTheBulldog
7 Replies
4. Emergency UNIX and Linux Support
Hi,
I need a way to grab the total combines since inception, total pages read from webalizer on my centos server or any other location (as long as since inception) and display the result live on my website
So with each visit it would be increasing, or perhaps live (ajax) not sure
But can... (0 Replies)
Discussion started by: lawstudent
0 Replies
5. What is on Your Mind?
Is firefox complaining to anyone else that this is a Reported Attack Page!? I have used this site a million times and now it feels like complaining.
Fedora Manpages: Home (5 Replies)
Discussion started by: cokedude
5 Replies
6. Shell Programming and Scripting
Input file
SFSQW 5192.56
HNRNPK 611.486
QEQW 1202.15
ASDR 568.627
QWET 6382.11
SFSQW 4386.3
HNRNPK 100
SFSQW 500
Desired output file
SFSQW 10078.86 3
QWET 6382.11 1
QEQW 1202.15 1
HNRNPK 711.49 2
ASDR 568.63 1
The way I tried: (2 Replies)
Discussion started by: patrick87
2 Replies
7. Shell Programming and Scripting
Hi,
I need your help on the following Scenario :
Consider a file has 650 records and I need to split this file into 4 files having a maximum of 200 records in each of them and also for the first splitted file it should get appended with Page 1 as a trailer( Similarly for the second file, Page... (4 Replies)
Discussion started by: Ravichander
4 Replies
8. Shell Programming and Scripting
Hi,
If there is an expert that can help:
I have many txt files that are produced from pdftotext that include page breaks the page breaks seem to be unix style hex 0C.
I want to add page numbers before each page break as in : Page XXXX
Regards antman (9 Replies)
Discussion started by: antman
9 Replies
LEARN ABOUT DEBIAN
cgi::emulate::psgi
CGI::Emulate::PSGI(3pm) User Contributed Perl Documentation CGI::Emulate::PSGI(3pm)
NAME
CGI::Emulate::PSGI - PSGI adapter for CGI
SYNOPSIS
my $app = CGI::Emulate::PSGI->handler(sub {
# Existing CGI code
});
DESCRIPTION
This module allows an application designed for the CGI environment to run in a PSGI environment, and thus on any of the backends that PSGI
supports.
It works by translating the environment provided by the PSGI specification to one expected by the CGI specification. Likewise, it captures
output as it would be prepared for the CGI standard, and translates it to the format expected for the PSGI standard using CGI::Parse::PSGI
module.
CGI.pm
If your application uses CGI, be sure to cleanup the global variables in the handler loop yourself, so:
my $app = CGI::Emulate::PSGI->handler(sub {
use CGI;
CGI::initialize_globals();
my $q = CGI->new;
# ...
});
Otherwise previous request variables will be reused in the new requests.
Alternatively, you can install and use CGI::Compile from CPAN and compiles your existing CGI scripts into a sub that is perfectly ready to
be converted to PSGI application using this module.
my $sub = CGI::Compile->compile("/path/to/script.cgi");
my $app = CGI::Emulate::PSGI->handler($sub);
This will take care of assigning an unique namespace for each script etc. See CGI::Compile for details.
You can also consider using CGI::PSGI but that would require you to slightly change your code from:
my $q = CGI->new;
# ...
print $q->header, $output;
into:
use CGI::PSGI;
my $app = sub {
my $env = shift;
my $q = CGI::PSGI->new($env);
# ...
return [ $q->psgi_header, [ $output ] ];
};
See CGI::PSGI for details.
METHODS
handler
my $app = CGI::Emulate::PSGI->handler($code);
Creates a PSGI application code reference out of CGI code reference.
emulate_environment
my %env = CGI::Emulate::PSGI->emulate_environment($env);
Creates an environment hash out of PSGI environment hash. If your code or framework just needs an environment variable emulation, use
this method like:
local %ENV = (%ENV, CGI::Emulate::PSGI->emulate_environment($env));
# run your application
If you use "handler" method to create a PSGI environment hash, this is automatically called in the created application.
AUTHOR
Tokuhiro Matsuno <tokuhirom@cpan.org>
Tatsuhiko Miyagawa
COPYRIGHT AND LICENSE
Copyright (c) 2009-2010 by tokuhirom.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
The full text of the license can be found in the LICENSE file included with this module.
SEE ALSO
PSGI CGI::Compile CGI::PSGI Plack CGI::Parse::PSGI
perl v5.14.2 2012-03-18 CGI::Emulate::PSGI(3pm)