Hi guys and gals!
Been scratching my head about this for a week now and still don't have a solution.
I am making a form post to a web service using the following:
my $userAgent = new LWP::UserAgent;
$userAgent -> timeout([10]);
$response = $userAgent -> post($uri,
[
Username...
You didnt have speech marks for $string value
... and use strict!!!
This works...
use strict;
my $string = "A4522-ITRZ";
my $search_string = "A4522";
if ($string =~ /$search_string/) {
print "Woohoo!";
}
[2thumbsup]
I am connecting to an SSL server, essentially i am using the Crypt::SSLeay module. The module does all the work for me, checks the servers certificate etc.
Although i dont need a certificate to access the server I know i can provide one, presumeably so the server can authenticate me? under what...
Wasn't running it correctly on IIS.
Thanks for input, using CGI module now and it works a treat!
[2thumbsup][2thumbsup][2thumbsup][2thumbsup][2thumbsup][2thumbsup][2thumbsup]
I am playing about with forms and trying to receive some form data from a form post. Im getting no errors but im getting nothin output. Here is the HTML:
<form method="post" action="EsendexAccountEventHandler.pl">
<input type="hidden" name="value1" value="test1">
<input type="hidden"...
Trying to place occurances of + with ' ' (a space) from a string, and %3a with : from another string like so:
$four =~ s/"+"/ /;
$five =~ s/"%3a"/:/;
This doesn't do anything :(
Any ideas?
The array was being input the values ok. But because i was passing the array back through several classes, in one of them i referred to the array as a scalar by accident -> this takes the array size and this is why it wasnt being output. The Dumper method is handy - thanks stevexff!
Trying to add hashes to array then loop through and print them off. To add each hash to the array i am using:
push (@messages,
{
messageID => $1,
originator => $2,
recipient => $3,
body => $4,
receivedAt => $5,
type => $6
});
To print the contents i am using:
my...
Thanks for your input ishnid.
All I needed to do was access the code via $1 variable:
#Return MessageID value
$string =~ m/MessageIDs=(.*)$/;
$response = $1;
I want just the long string. So if the line is:
MessageIDs=f89fcc9b-b7ba-44a8-bebe-785302b6f136
I want this bit:
f89fcc9b-b7ba-44a8-bebe-785302b6f136
The bit between 'MessageIDs=' and end of line.
This still returns '1' rather than 'f89fcc9b-b7ba-44a8-bebe-785302b6f136'
I am being returned some data that looks like:
Set-Cookie: ASP.NET_SessionId=bir2jo45j0jev355wqdp0xed; path=/
X-AspNet-Version: 1.1.4322
X-Powered-By: ASP.NET
Result=OK
MessageIDs=f89fcc9b-b7ba-44a8-bebe-785302b6f136
The bit i am interested in is the Result and messageIDs lines. I can...
Ha! Don't wanna sound too much like an idiot but it infact doesn't work. Essentially I need to access the 'username' field of object to pass it to the formPostTest method. I can create a new variable and store the value of the object's field:
my $username = $object -> {username};
but for some...
Basically the first 3 values i am passing into formPostTest were passing as some sort of hash values?! Putting single quotes around the hash keys solved the problem:
my $response = $post -> formPostTest
(
'$object -> {username}', '$object -> {password}', '$object -> {account}',
$uri...
I have created an instance of SendServiceTest in my Main perl app and then call a method of SendServiceTest on the object like so:
my $message = new SendServiceTest
(
$username,
$password,
$account
);
$message -> sendMessageTest($uri, $recipient, $originator, $body, $type, $validityPeriod)...
AFAIK -> As far as I know.
When it says 'peer certificate' is it referring to me, as in the perl script accessing the service? Because in the output, the web server i am using looks like it has a valid certificate, here is the output (i've taken out the company name etc)...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.