10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
I saved to disk using lynx, under ls it shows up but no matter what I have done back comes the statment no such file.
How do you erase these ls false readings or open what ls shows? (9 Replies)
Discussion started by: Jackbird
9 Replies
2. Shell Programming and Scripting
Hi All ,
I am very new to unix script.I am aware of unix commands but never put together in unix script level.If any one can suggest me technical guidance in the below scenario that will highly beneficial.
Data have been already migrated from mainframe to Hadoop file system(HDFS).HDFS server... (15 Replies)
Discussion started by: STCET22
15 Replies
3. Shell Programming and Scripting
Im trying to write a perl code to do the following task.
I have a website which is located in a diffirent country.
I want to download a file from that site everyday.
The file name keeps on changing everyday.
say the file name is CTP-latest-5.3.0.37.iso
next day it may change to... (0 Replies)
Discussion started by: srijith
0 Replies
4. Shell Programming and Scripting
How can i print the output of a perl script on a unix console and redirect the same in a log file under same directory simultaneously ?
Like in Shell script, we use tee, is there anything in Perl or any other option ? (2 Replies)
Discussion started by: butterfly20
2 Replies
5. Shell Programming and Scripting
I need to write a perl script to search for a specific set of numbers that occur after a series of words but before another. Specifically, I need to locate the phrase today at the summit, then immediately prior to the words tonnes/day copy the number that will be between 100 and 9,999, for example,... (1 Reply)
Discussion started by: libertyforall
1 Replies
6. Shell Programming and Scripting
Hi All,
Sorry to ask this question and i am not sure whether it is possible. please reply to my question. Thanks in advance.
I need a perl script ( or any linux compatible scripts ) to copy the graphical contents of the webpage to a word pad.
Say for example, i have a documentation site... (10 Replies)
Discussion started by: anand.linux1984
10 Replies
7. Shell Programming and Scripting
Attached is my meager attempt to create a Kommander GUI for the youtube-dl command line utility. Change the extension from TXT to KMDR. You'll need Kommander and youtube-dl installed, of course. Comments, suggestions, revisions welcome. I'm a total novice at this stuff, so please go easy. I'm... (0 Replies)
Discussion started by: godzillarama
0 Replies
8. Shell Programming and Scripting
Hi,
I am newbie in Perl/CGI and I need your help to develop a little script to help me to download some files located in a FTP server via HTTP to a disk.
I need to authenticate with username/password via a HTTP page and I can choose the files to download from the web page to my disk.
Can... (2 Replies)
Discussion started by: imad77
2 Replies
9. UNIX and Linux Applications
The rise of Video web stimulates more intuitive video feeling of large people, and makes video downloading becomes a popular trend in web times, meanwhile, more and more downloading problems arises correspondingly, in which the first trouble is slow downloading speed and incomplete downloading. It... (0 Replies)
Discussion started by: angelstar
0 Replies
10. Shell Programming and Scripting
Hi,
I am writing a series of scripts for work to analyse intranet access logs. All of the scripts do as they should when run individually from the shell, but only when run from certain directories. This sounds like it may be a PATH issue but I am not sure. When I run a certain script, say... (3 Replies)
Discussion started by: mmanders
3 Replies
Plack::App::CGIBin(3pm) User Contributed Perl Documentation Plack::App::CGIBin(3pm)
NAME
Plack::App::CGIBin - cgi-bin replacement for Plack servers
SYNOPSIS
use Plack::App::CGIBin;
use Plack::Builder;
my $app = Plack::App::CGIBin->new(root => "/path/to/cgi-bin")->to_app;
builder {
mount "/cgi-bin" => $app;
};
# Or from the command line
plackup -MPlack::App::CGIBin -e 'Plack::App::CGIBin->new(root => "/path/to/cgi-bin")->to_app'
DESCRIPTION
Plack::App::CGIBin allows you to load CGI scripts from a directory and convert them into a PSGI application.
This would give you the extreme easiness when you have bunch of old CGI scripts that is loaded using cgi-bin of Apache web server.
HOW IT WORKS
This application checks if a given file path is a perl script and if so, uses CGI::Compile to compile a CGI script into a sub (like
ModPerl::Registry) and then run it as a persistent application using CGI::Emulate::PSGI.
If the given file is not a perl script, it executes the script just like a normal CGI script with fork & exec. This is like a normal web
server mode and no performance benefit is achieved.
The default mechanism to determine if a given file is a Perl script is as follows:
o Check if the filename ends with ".pl". If yes, it is a Perl script.
o Open the file and see if the shebang (first line of the file) contains the word "perl" (like "#!/usr/bin/perl"). If yes, it is a Perl
script.
You can customize this behavior by passing "exec_cb" callback, which takes a file path to its first argument.
For example, if your perl-based CGI script uses lots of global variables and such and are not ready to run on a persistent environment, you
can do:
my $app = Plack::App::CGIBin->new(
root => "/path/to/cgi-bin",
exec_cb => sub { 1 },
)->to_app;
to always force the execute option for any files.
AUTHOR
Tatsuhiko Miyagawa
SEE ALSO
Plack::App::File CGI::Emulate::PSGI CGI::Compile Plack::App::WrapCGI
See also Plack::App::WrapCGI if you compile one CGI script into a PSGI application without serving CGI scripts from a directory, to remove
overhead of filesystem lookups, etc.
perl v5.14.2 2011-11-02 Plack::App::CGIBin(3pm)