I'm attempting to create a Perl script that will:
Take the contents of the usernames.tmp file
(usernames.tmp is created from an awk one-liner ran against /etc/passwd)
Take one line at a time and pass it to the su command as a users name.
This should go on until there is no more name to... (10 Replies)
I need to write a perl script to execute external programs and grab the output and return code. Each program should be killed if it has not completed within X seconds.
Imagine that the script goes something like this :
@commands = &get_commands();
foreach $cmd (@commands) {
$pid =... (4 Replies)
PFA file "color.txt".
Note : There is no newline character in the file. I have manually inserted the newline char to make it easy to understand.
I am expecting out in the form as specified in second file "out.txt"
I need a perl script to perform the task.
Thanks in advance. (2 Replies)
Hello,
Please advise. Scoured this site, as well as google for answers. However if you do not know what to search for, it's a bit hard to find answers.
INPUT:
ACTASS=
802
BASECOS=
279
COSNCHG=
3
CUSCOS=
52
UPLDCOS=
2
DESIRED OUTPUT:
ACTASS=802
BASECOS=279 (13 Replies)
hi
am senthil
am developing a software to send and receive SMS using HTTP connection
first of all am forming a URL and sending that URL to a remote server using my Client Program
i send that url through Socket(using Send() Function)
if i send more than one URL one by one using the same... (4 Replies)
Hello,
I'm using a tunnel broker for tunneling IPv6 traffic, as my ISP does not support it natively. As of recent i switched from Hurricane Electrics tunnel broker to Sixxs.
Whenever my IP address changes, i have to manually log in and change it. This is a bit cumbersome so i was thinking of... (0 Replies)
Hi,
I'm trying to write a script to determine the time gap between HTTP PUT and HTTP DELETE requests in the HTTP Servers access log.
Normally client will do HTTP PUT to push content e.g. file_1.txt and 21 seconds later it will do HTTP DELETE, but sometimes the time varies causing some issues... (3 Replies)
I'm currently using OpenBSD current as of yesterday. Both curl and wget aren't not part of the OpenBSD base and I would rather attempt to reboot my cable modem (SB6183) using perl HTTP:Tiny if possible. The following 2 commands work and both will reboot my modem:
curl -d Rebooting=1... (3 Replies)
As a followup to my previous thread, I'm trying to make a complicated perl script that involves storing information from a text file into a hash, and giving the user the ability to change the information present/write the information currently inside the hash to a new file. This is the code I've... (8 Replies)
Discussion started by: Eric1
8 Replies
LEARN ABOUT DEBIAN
http::message::psgi
HTTP::Message::PSGI(3pm) User Contributed Perl Documentation HTTP::Message::PSGI(3pm)NAME
HTTP::Message::PSGI - Converts HTTP::Request and HTTP::Response from/to PSGI env and response
SYNOPSIS
use HTTP::Message::PSGI;
# $req is HTTP::Request, $res is HTTP::Response
my $env = req_to_psgi($req);
my $res = res_from_psgi([ $status, $headers, $body ]);
# Adds methods to HTTP::Request/Response class as well
my $env = $req->to_psgi;
my $res = HTTP::Response->from_psgi([ $status, $headers, $body ]);
DESCRIPTION
HTTP::Message::PSGI gives you convenient methods convert HTTP::Request object to PSGI env hash and convert PSGI response array ref to
HTTP::Response object.
If you want the other way round, see Plack::Request and Plack::Response.
METHODS
req_to_psgi
my $env = req_to_psgi($req [, $key => $val ... ]);
Converts HTTP::Request object into PSGI env hash reference.
HTTP::Request::to_psgi
my $env = $req->to_psgi;
Same as "req_to_psgi" but an instance method in HTTP::Request.
res_from_psgi
my $res = res_from_psgi([ $status, $headers, $body ]);
Creates HTTP::Response object from PSGI response array ref.
HTTP::Response->from_psgi
my $res = HTTP::Response->from_psgi([ $status, $headers, $body ]);
Same as "res_from_psgi" but a class method in HTTP::Response.
AUTHOR
Tatsuhiko Miyagawa
SEE ALSO
HTTP::Request::AsCGI HTTP::Message Plack::Test
perl v5.14.2 2012-05-17 HTTP::Message::PSGI(3pm)