Hi Everybody,
I have an layout file like below
f1 1 char 10,
f2 11 char 2,
f3 13 char 1,
lineend 14 char 1
Their I need to add a new field which would be like
f5 char 3,
f6 char 2
The o/p should be
f1 1 char 10,
f2 11 char 2,
f3 13 char 1,
f5 14 char 3,
f6 17 char 2 (3 Replies)
I have a file with 32 fields each separated by ‘|”. I need to add a file date exactly in the format “ "20100120" “ as the 32nd field moving the existing 32nd field to 33. so the field I added should be 32nd and the 33rd field is the last field before I added the file date.
I know we can... (8 Replies)
I need some help with adding lines to file and substitute a pattern.
Ok I have a file:
#cat names.txt
name: John Doe
stationed: 1
name: Michael Sweets
stationed: 41
.
.
.
And would like to change it to:
name: John Doe
employed
permanently
stationed: 1-office (7 Replies)
hi
i am student doing project in ns2.34.
i hav to add field in route cache and packet of DSR routing protocol.
which files hv to be changed...pl help me (1 Reply)
Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!
1. The problem statement, all variables and given/known data:
want to add field to route cache and packet of DSR routing protocol in ns2.34, add field, DSR package in ns2.34... (2 Replies)
Hi All,
I have a file(Pipe Delimited) where i need to add a blank field before the last field and a blank field after the last field. Please help. I have provided below the sample input records and desired output.
Code:
Sample Input: A0010000|Abilene TX A 1|A0010957|Dallas... (0 Replies)
Hi All,
I get a file on weekly basis from client. I need to write a script which make sure the file should have 20 columns after the first column. If not then the script should add the remaining columns and default them to space(except for 2nd and 3rd). and at the same time the script should... (25 Replies)
Dear AWK-experts!
I did get stuck in the task of combining files after matching fields, so I'm still awkward with learning AWK.
There are 2 files: one containing 3 columns with ID, coding status, and score for long noncoding RNAs:
file1 (1.txt) (>5000 lines)
... (12 Replies)
I have an array in an external file, "array.txt", which contains:
char *testarray={"Zero", "One", "Two", "Three", "Four", "Five", "Six", "Seven", "Eight", "Nine"};I want to be able to add an element to this array, and have that element display, whenever I call it, without having to recompile... (29 Replies)
Discussion started by: ignatius
29 Replies
LEARN ABOUT DEBIAN
http::request::params
HTTP::Request::Params(3pm) User Contributed Perl Documentation HTTP::Request::Params(3pm)NAME
HTTP::Request::Params - Retrieve GET/POST Parameters from HTTP Requests
SYNOPSIS
use HTTP::Request::Params;
my $http_request = read_request();
my $parse_params = HTTP::Request::Params->new({
req => $http_request,
});
my $params = $parse_params->params;
DESCRIPTION
This software does all the dirty work of parsing HTTP Requests to find incoming query parameters.
new
my $parser = HTTP::Request::Params->new({
req => $http_request,
});
"req" - This required argument is either an "HTTP::Request" object or a string containing an entier HTTP Request.
Incoming query parameters come from two places. The first place is the "query" portion of the URL. Second is the content portion of an HTTP
request as is the case when parsing a POST request, for example.
params
my $params = $parser->params;
Returns a hash reference containing all the parameters. The keys in this hash are the names of the parameters. Values are the values
associated with those parameters in the incoming query. For parameters with multiple values, the value in this hash will be a list
reference. This is the same behaviour as the "CGI" module's "Vars()" function.
req
my $req_object = $parser->req;
Returns the "HTTP::Request" object.
mime
my $mime_object = $parser->mime;
Returns the "Email::MIME" object.
Now, you may be wondering why we're dealing with an "Email::MIME" object. The answer is simple. It's an amazing parser for MIME compliant
messages, and RFC 822 compliant messages. When parsing incoming POST data, especially file uploads, "Email::MIME" is the perfect fit. It's
fast and light.
SEE ALSO
"HTTP::Daemon", HTTP::Request, Email::MIME, CGI, perl.
AUTHOR
Casey West, <casey@geeknest.com>.
COPYRIGHT
Copyright (c) 2005 Casey West. All rights reserved.
This module is free software; you can redistribute it and/or modify it
under the same terms as Perl itself.
perl v5.10.1 2005-01-12 HTTP::Request::Params(3pm)