age);
my $xml = XML::Smart->new($resp->decoded_content);
my $dest = $xml->{PHC_LOGIN}{REDIRECTURL};
print "Location: $dest\n\n";
On Aug 22, 2014, at 10:38 AM, Rob Dixon wrote:
> On 22/08/2014 11:27, angus wrote:
>> Hi,
>>
>> Hi,
>>
>> I hav
e\r
0\r
Login Successful\r
https://example.com/cust/login.asp\r
Thanks in advance for any tips you can provide.
-angus
believe XML::Smart defaults to ASCII encoding or iso-8859-1 which I think are
the same thing. I wonder though if LWP is using UTF-8 by default, and maybe
that is causing me issues?
Thanks in advance for any input you can provide.
-angus
#!/usr/bin/perl
use LWP::UserAgent;
use HTTP::Request;
use
I am trying to recreate some code written in C# using perl. The goal is to
create an XML formatted login packet and post it to http webserver and then
parse the response. My first hurdle I think is to create the XML login packet.
Here is the sample of what the login packet is supposed to lo
I am trying to recreate some code written in C# using perl. The goal is to
create an XML formatted login packet and post it to http webserver and then
parse the response. My first hurdle I think is to create the XML login packet.
Here is the sample of what the login packet is supposed to lo
$index: $!\n";
opendir (PDFDIR, $pdf_dir) || die "Can't open $pdf_dir: $!\n";
while (my $line = ) {
chomp $line;
my ($raw_name, $std_name) = (split /\|/, $line);
if (grep {$std_name} readdir(PDFDIR)) {
print "I found this: $std_name\n&
f a
key not a value, and the user will input the value.
thanks in advance for any hints.
-Angus
#!/usr/bin/perl
use strict;
use warnings;
print "enter path:";
chomp (my $dir = );
my %directory_hash = ("dir1" => "/usr/bin",
"dir2&q
done something similar
to this in the past. To see the data encrypted simply print out the array
@encrypted to screen or back to a file.
Hope this helps,
-angus
-Original Message-
From: Jason Balicki [mailto:[EMAIL PROTECTED]
Sent: Tuesday, May 23, 2006 8:31 AM
To: beginners@perl.org
S
x27;s
dependencies?
Thanks,
-angus
day, March 03, 2006 1:25 AM
To: Angus; beginners@perl.org
Subject: RE: problems with logical && (and) statement
Is the typo "$dhcp{$wrkst}-{network}" in your production script?
-Original Message-
From: Angus [mailto:[EMAIL PROTECTED]
Sent: Friday, March 03, 2006 1:
hostname "HOST2";
}
lease 10.10.97.170 {
starts 0 2005/12/25 23:08:02;
ends 1 2005/12/26 03:08:02;
tstp 1 2005/12/26 03:08:02;
binding state free;
hardware ethernet 00:0b:97:2b:ea:54;
uid "\001\000\013\227+\352T";
client-hostname "HOST3";
}
Script generated output
# Host info including names and ip addr
#
#
# HOSTNAME HOST IP
Host is HOST1 Subnet is 10.10.12.1
Host is HOST2 Subnet is 10.10.9.128
Host is HOST3 Subnet is 10.10.14.128
Thanks,
-angus
Hello all,
I have found a very useful little module for parsing DHCP logs and in the
following script I have been able to create a hash of hashes based on the
data extracted from a dhcp log. However, my problem now is that I want to
determine what subnet a host is on. For the moment I will on
t does the m on the
outside do?
Thanks again for the example it is really interesting and has helped me.
-angus
-Original Message-
From: Hans Meier (John Doe) [mailto:[EMAIL PROTECTED]
Sent: Monday, February 27, 2006 12:53 AM
To: beginners@perl.org
Subject: Re: problems parsing a DHCP
did try to regex
match but it still returns an undef variable...
-angus
-Original Message-
From: The Ghost [mailto:[EMAIL PROTECTED]
Sent: Monday, February 27, 2006 12:13 AM
To: Angus
Cc: beginners@perl.org
Subject: Re: problems parsing a DHCP.leases file.
you need to match something.
Yo
ient-hostname/) {
$hostname = $1; }
else {next;};
print "I found IP:$ip\n";
print "I found Hostname: $hostname\n";
}
}
Thanks,
-angus
th really understanding this but I am closer.
Well again thanks for your help,
-angus
P.s. Your English is probably better than mine; I wouldn't know it wasn't
your first language if you didn't mention it.
-Original Message-
From: John Doe [mailto:[EMAIL PROTECTED]
Sen
d
explain how this works but if you don't want to I understand and still very
much appreciate your help.
Thanks,
-angus
#!/usr/bin/perl
#
use strict;
use warnings;
system "clear";
my %actual = (
"host1" => "164.72.119.175",
"host2" => "16
Hello,
I am trying to write a little script that will compare two hashes with the
same keys but conflicting values. I have found some great examples of how
to compare hashes and locate common keys or missing keys (in the cookbook).
I have also found a great example of how to locate duplicate k
Jenda,
Thanks for a very impressive answer.
Angus
-Original Message-
From: Jenda Krynicky [mailto:[EMAIL PROTECTED]]
Sent: 18 March 2002 12:05
To: Laycock, Angus; [EMAIL PROTECTED]
Subject: RE: @ARGV question
From: "Laycock, Angus" <[EMAIL PROTECTED]>
> $ARGV[$co
Jonathan,
Thanks for your help. I just want the info in the parameters that I was
passing and changing it to foreach loop has done the job. I just assumed the
while loop would do what I wanted.
Thanks for your help again.
Angus
-Original Message-
From: Jonathan E. Paton [mailto
oop twice rather than once. On
the second iteration there is no value to process.
Angus
-Original Message-
From: Jonathan E. Paton [mailto:[EMAIL PROTECTED]]
Sent: 18 March 2002 11:05
To: [EMAIL PROTECTED]
Subject: Re: @ARGV question
> while (<$ARGV>) {
> print &
Could someone tell me the best way. I assumed the first option would be the
best but it does not work.
Thanks
Angus
--
This message is intended only for the personal and confidential use of the designated
recipie
I'll try this in the morning.
Thanks
Gus
- Original Message -
From: Timothy Johnson <[EMAIL PROTECTED]>
To: Timothy Johnson <[EMAIL PROTECTED]>; 'Angus Laycock'
<[EMAIL PROTECTED]>; Tanton Gibbs <[EMAIL PROTECTED]>;
<[EMAIL PROTECTED]>
Sent:
ut. I thought I would try with the option of
not quoting numbers. It is a total headblower and I don't have much time.
Gus
- Original Message -
From: Michael Fowler <[EMAIL PROTECTED]>
To: Angus Laycock <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Wednesday,
What about on negative numbers like -1? They come up with quotes, any ideas?
Thanks
Gus
- Original Message -
From: Tanton Gibbs <[EMAIL PROTECTED]>
To: Angus Laycock <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Wednesday, February 27, 2002 10:53 PM
Subject: Re: Crea
I know I now have the result but how does it do it?
$string .= /\D/ ? "'$_'," : "$_,";
If you have the time.
Thanks again
Gus
- Original Message -
From: Tanton Gibbs <[EMAIL PROTECTED]>
To: Angus Laycock <[EMAIL PROTECTED]>; <[EMAIL PROT
Tanton,
Cheers. I stuck a chop in at the end and got the results.
'alf','bert','charlie',4
Thanks to you both
Cheers again
Gus
- Original Message -
From: Tanton Gibbs <[EMAIL PROTECTED]>
To: Angus Laycock <[EMAIL PROTECTED]>; <[EMAIL PROT
rings.
Thanks
Gus
- Original Message -
From: Timothy Johnson <[EMAIL PROTECTED]>
To: 'Angus Laycock' <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Wednesday, February 27, 2002 10:24 PM
Subject: RE: Creating a string with quotes and delimiters from an Array
Hi,
I have an array > @array = qw(alf bert charlie 4)
and I want a string that contains this value < 'alf','bert','charlie','4' > with the
single quotes and commas.
I know I can do this $string = join ( ',' , @array); which gives me this > <
one|two|three|four> but how do I get the si
Job sorted, it works!!!
Thanks you all for your help.
Gus
-Original Message-
From: Jenda Krynicky [mailto:[EMAIL PROTECTED]]
Sent: 19 February 2002 15:20
To: '[EMAIL PROTECTED]'
Subject: Re: Changing STDERR
From: "Laycock, Angus" <[EMAIL PR
Please,
Can someone tell me how to change STDERR to output to a file then change it
back to its original output.
my $oldout = select STDERR;
print STDERR "test1\n";
open STDERR, ">test.txt" or die "Can't open file STDERR [OUTPUT]";
print STDERR "test2\n";# goes to file
select $ol
Hi,
I want to print messages from a script to either STDOUT or STDERR depending on a value
of a variable. I want to control where I send the print statements to. Can I do
something like this or are there other ways to control the target I send my message
to. I'm hoping there are lots of other
Hi,
I have written a script the handles calls to a Sybase Database. The only problem I
have is handling the "Return Code" from Stored Procedures.
I have gone through the PERL DBI book but the only reference I can find in the
Appendix(Page 326), it is to do with syb_result_type.
I have used
Hi,
I wrote this today on UNIX . When I tested the script, calling it with all the options
(f s D P U S e q ) the "-s" option would not return the value from the command line.
All the other variables got populated. I then change the "s:s" to "f:s" and that
worked. I am trying to replace some s
lt;[EMAIL PROTECTED]>
To: 'Angus Laycock' <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Tuesday, January 29, 2002 10:24 PM
Subject: RE: Perl path for windows 98
>
> When you say that you "downloaded PERL", what distribution did you
download?
> For Win32 pla
Hi,
I have just downloaded PERL and set it up on my machine at home. Is there a path
(#!/whatever ) I can put at the top of my script instead of typing "perl myscript.pl"
to execute the script in Windows 98.
Thanks in Advance
Gus
36 matches
Mail list logo