07-02-2008
Thanks for your answer
radoulov
you always helped me. Still sorry for this questions again...
In the perl script I'm using "#!/usr/bin/perl" in the first line. Is it required to write perl in your first line *perl -F';' -lane'* ?
As you know I'm not an advanced perl programmer, could you please explain your code? i.e, what is the meaning of *' -lane'* and where is the output file name etc...
Sorry, eventhough I'm wasting your valuable time, it would be very helpful for me..
Thanks again / Mysore Ganapati.
9 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi all,
I'm trying in vain to workout how I can generate a report from a months worth of files that get created every day. There is one file per day and each daily file contain the output from a df -v command.
With the following section of code ...
for xdffile in $1$2/df??
do
... (4 Replies)
Discussion started by: Cameron
4 Replies
2. Shell Programming and Scripting
I have been recently given a PERL script to develop, but the main problem is that the perl version that I have to use is old, also I cant download modules from CPAN.
Perl version 5.0005
I didnt realise this untill I had the script ready to be tested, so there are a few modules that I have... (6 Replies)
Discussion started by: meevagh
6 Replies
3. Shell Programming and Scripting
hi,
i have a script that coverts the file time in epoch time.but the problem is perl is not working inside the k-shell
----------------------------------------------------------------
#!/bin/ksh
echo "Enter the file"
read n
perl -e 'print ((stat("n")))'... (6 Replies)
Discussion started by: ali560045
6 Replies
4. Programming
I am trying to run the following script which is a file format converter. The frame variable in the input file has a file of 3,2,1 which needs to be 0,1,2 respectively i.e. 3 =0 etc.
I have included the tr/// function into the script to do this, however it does not seem to be working
input its... (2 Replies)
Discussion started by: fordie
2 Replies
5. Shell Programming and Scripting
Hi all,
we do have daily oracle database backups and i need to generate report of each database start point and end point
we are using netapp snapshot(filer level) for backups.
all backups logs will be come in one directory
/u01/app/oracle/backup/hostname/log/*
here... (7 Replies)
Discussion started by: prakashdba2010
7 Replies
6. Shell Programming and Scripting
Hello everyone,
I have a list of inputs as below. My logic is to get the particular powerdisk which matches for ASM disk which means take the major & minor number of each asm disk and matches with powerdisk info then get the particular powerdisk
$ ls -l /dev/asm_* ---> ASM disk info... (11 Replies)
Discussion started by: kannan84
11 Replies
7. Web Development
Can anyone tell me how to export a variable from one perl CGI script to another perl cgi script when using a redirect.
Upon running the login.pl the user is prompted to enter user name and password. Upon entering the correct credentials (admin/admin) the user is
redirected to welcome page.
My... (3 Replies)
Discussion started by: Arun_Linux
3 Replies
8. Shell Programming and Scripting
Hello,
I have a large amount of data with the following structure:
Word=Transliterated word
I have written a Perl Script (reproduced below) which goes through the full file and identifies all dupes on the right hand side. It creates successfully a new file with two headers: Singletons and Dupes.... (5 Replies)
Discussion started by: gimley
5 Replies
9. Shell Programming and Scripting
Hi,
I have a perl script to read the log file and create a report from it. I have the script file and log file in a different directories. Now i have pipe the log file data to the perl script to create the report (HMTL file). I am using the below command this isn't working
tail -f... (4 Replies)
Discussion started by: vel4ever
4 Replies
LEARN ABOUT DEBIAN
plack::app::cgibin
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)