Hi all,
I want to Pass the credentials and the Post parameters in a request and need to
get the response content.
I tried with the following approach.
1) Credentials are getting passed correctly however am not getting the
parameter passed.
2) If am passing the credentials in the url it is
Hi,
I want to Pass values for GET method. As like we pass value for POST method
use strict;
use warnings;
my $browser = LWP::UserAgent-new;
my $word = $ARGV[0];
my $url = 'http://mylink';
my $response = $browser-post( $url,['q' = $word]);
die $url error: , $response-status_line
- Original Message
From: Gunnar Hjalmarsson [EMAIL PROTECTED]
To: beginners@perl.org
Sent: Saturday, April 5, 2008 11:22:41 PM
Subject: Re: String To Hash Conversion
Prabu Ayyappan wrote:
I want to convert a string into a Hash data structure
For Example
String:
[['aaa',{27
Hi All,
I want to convert a string into a Hash data structure
For Example
String:
[['aaa',{27' = '543','21' = '111','Client' = '543','chat' = '111'}]]
Hash:
[['aaa',{27' = '543','21' = '111','Client' = '543','chat' = '111'}]
From CPAN I got a module called Convert/PerlRef2String
- Original Message
From: JBallinger [EMAIL PROTECTED]
To: beginners@perl.org
Sent: Monday, March 17, 2008 9:18:12 PM
Subject: Re: Hash CSV
On Mar 14, 3:26 pm, [EMAIL PROTECTED] (Manoj) wrote:
When using Data: Dumper is taking more time for my 1 lines of CSV file.
This solved a few
- Original Message
From: Manoj [EMAIL PROTECTED]
To: beginners@perl.org
Sent: Friday, March 14, 2008 12:09:42 AM
Subject: Hash CSV
Hello list,
Have a CSV file with the first column as unique which I am taking as hash
key and rest of the line as hash value. I am opening the file and
- Original Message
From: [EMAIL PROTECTED] [EMAIL PROTECTED]
To: beginners@perl.org
Sent: Friday, March 14, 2008 5:14:40 AM
Subject: how to search manual for use strict
Hi,
I want to read the installed perl manual on use strict, so how do I search
the perl manual for use strict
Thanks
Hi All,
Below are some of the way to optimize the perl code. You can add more to this
if you have something more.
1) use a reference instead of the variable directly
Use reference in passing large arrays in a function call. Because without a
reference it will copy the entire array or hash onto
Hi All,
What is the difference in Accepting the following form of standard input?
1) $a = STDIN;
2) $b = stdin;
3) $c = ;
Now check,
print $a $b $c;
What is actually happening?
Will this be written to some standard input file?
If so In windows where this will be written?
Thanks,
Prabu.M.A
Hi Siva,
Leave the perl script and first try the url in your browser.
If it works fine means then the code will get you the HTML contecnt of that
page.
Thanks and Regards,
Prabu.M.A
- Original Message
From: Siva Prasad [EMAIL PROTECTED]
To: beginners@perl.org
Sent: Wednesday,
Hi Siva,
I doubt the problem is with the version of perl you are using.
The symbol Perl_sv_2iv_flags may be introduced with the new version of perl
Try with Perl version is: v5.8.9
- Original Message
From: sivasakthi [EMAIL PROTECTED]
To: beginners perl beginners@perl.org
Sent:
Hi,
You can get the ppms from the below links,
http://trouchelle.com/ppm/
hope this help,
Thanks,
Prabu.M.A
Jeff Pang [EMAIL PROTECTED] wrote:
-Original Message-
From: Gladstone Daniel - dglads
Sent: Aug 10, 2007 9:39 PM
To: beginners@perl.org
Subject: New to Perl
Good Morning
Jenda Krynicky [EMAIL PROTECTED] wrote:
From: Prabu Ayyappan
Thanks for the valuable inputs,
I am planning to solve my memory issue by making the XML into Chunks
using Xml::Twig and using simplify( ) in XML::Twig to convert that
chunks back into the Hash data structure
a 100MB file each time to take the
node.
Thanks in advance,
Prabu
Jenda Krynicky [EMAIL PROTECTED] wrote:
From: Prabu Ayyappan
Thanks for the valuable inputs,
I am planning to solve my memory issue by making the XML into Chunks
using Xml::Twig and using simplify( ) in XML::Twig
that after
processing that chunk i will purge my memory (purge in XML::Twig)
Thanks in advance,
Prabu
Jenda Krynicky [EMAIL PROTECTED] wrote: From: Rob Dixon
Prabu Ayyappan wrote:
I want to convert a huge XML file into an inMemory Hash.
I tried using XML::Simple. But its taking huge
Hi,
I want to convert a huge XML file into an inMemory Hash.
I tried using XML::Simple. But its taking huge memory space and time to
convert it into Hash.
While loading a XML file of 300MB its taking more memory space and time.
Is there any better method to load this XML
Hi Isha,
This may not help you. But some sort of debugging in your logic.
for($j=0;$j=13,$j++)
for($i=0;$i3600;$i++)
What is this 13 and 3600 ? is this the no of lines in the file ?.
Print and see the $#inittime $#lgfdlr $#U10m2 $#V10m2.
So that they all have the
Hi rolinson,
Read
perldoc perlrequick
perldoc perlre
perldoc perlretut
perldoc perl
perldoc perlfaq6
If you read this and if you tried something with this and still if you are
facing some trouble
you Post to the group with the doubts.
Hope this helps you a lot.
Hi Rupesh,
Can you explain your problem scenario a little more briefly. So that it may
help in understanding the problem clearly,
For Example,
My input is like
I am expecting this output.
What you tried to achieve your output..
Regards,
Prabu
[EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hi
);} .shape {behavior:url(#default#VML);}
Yup, lol
Wish I understood this! What is the line that does the search called? What do I
look up to read up on this?
Thanks!
jlc
From: Prabu Ayyappan [mailto:[EMAIL PROTECTED]
Sent: Tuesday, July 03, 2007 10:55 PM
To: Joseph L
@list = (Exchange,Filter,DNS,Domain);
sub stop_it {
$vm = $_[0];
print $vm\n;
}
stop_it(@list)
A semi-colon is missing in the list assignment.
if you want to get the first value of the list then you have to use
$_[0]
Second Value means
$_[1] and so on...
Hi,
I am using XML::Simple for converting the XML into a hash.
use Unicode::String qw(utf8);
use XML::Simple;
#use Data::Dumper;
$XML = STARTäT©imes/START;
$u = utf8($XML);
$XML = $u-utf8;
$myHash = XMLin($XML);
#print Dumper($myHash);
The above code works fine...
But the
Hi,
I am using XML::Simple for converting the XML into a hash.
use Unicode::String qw(utf8);
use XML::Simple;
#use Data::Dumper;
$XML = STARTäT©imes/START;
$u = utf8($XML);
$XML = $u-utf8;
$myHash = XMLin($XML);
#print Dumper($myHash);
The above code works fine...
But the
Its not even being displayed in by browser.The UTF-8 Character i meant is the
square characters in the Link
http://www.tony-franks.co.uk/UTF-8.htm
Prabu Ayyappan [EMAIL PROTECTED] wrote:
Hi,
I am using XML::Simple for converting the XML into a hash.
use Unicode::String qw(utf8
A quick solutionMay be you can enhance it more as you like..
@discarr = ('/vmfs/volumes/467f06a5-7d59c067-35cb-0007e9153886/AN-DC (Win2003
Ent x64)/AN-DC (Win2003 Ent
x64).vmx','/vmfs/volumes/467f06a5-7d59c067-35cb-0007e9153886/AN-DC (Win2003 Ent
x64)/Disc
Hi,
There is some good stuffs in the below link.
http://www.unix.org.ua/orelly/
Thanks,
Prabu
Garg, Mayank IN BOM SISL [EMAIL PROTECTED] wrote:
Hi all,
Can some one suggest me a good book on perl (basics and advanced)
Thanks Regards,
Mayank Garg
You can even do like this
$var1 == 0 $var2 == 1 ? print hai : print bye;
Thanks and Regards,
Prabu.M.A
Joseph L. Casale [EMAIL PROTECTED] wrote:
I want to script an if based on two conditions, var1=0 and var2=1.
Is there some quicker way to write this in one if statement like:
If
Hi,
Hope you can find your solution from the following two approaches
Approach I
#!/usr/bin/perl
while (*) {
if ($_ =~ /note/){
open(FH, $_);
@fcontent = FH;
print @fcontent;
close(FH);
}
}
APPROACH II
opendir(CURRENT,.);
@list = readdir(CURRENT);
Hi,
Hope you can find your solution from the following two approaches
Approach I
#!/usr/bin/perl
while (*) {
if ($_ =~ /note/){
open(FH, $_);
@fcontent = FH;
print @fcontent;
close(FH);
}
}
APPROACH II
opendir(CURRENT,.);
@list = readdir(CURRENT);
Hi,
Hope you can find your solution from the following two approaches
Approach I
#!/usr/bin/perl
while (*) {
if ($_ =~ /note/){
open(FH, $_);
@fcontent = FH;
print @fcontent;
close(FH);
}
}
APPROACH II
opendir(CURRENT,.);
@list = readdir(CURRENT);
Hi Alok,
Hope the examples in the below links help your needs.
For opening and reading an XL(Excel)
use strict;
use Win32::OLE qw(in with);
use Win32::OLE::Const 'Microsoft Excel';
$Win32::OLE::Warn = 3;# die on errors...
# get already active Excel
Hi All,
XML::Simple
XML::twig
XML::Myxml
XML::Rules
XML::path
all these do the XML parsing,But which one is the efficient and stable one to
parse a large XML file.
Thanks,
[EMAIL PROTECTED]
Mike Blezien [EMAIL PROTECTED] wrote:
- Original Message -
From: Karjala
To:
Cc: Mike
Hi,
Have you tried XML::XPath for this one.It may help you.
Thnx and Rgds,
[EMAIL PROTECTED]
Mike Blezien [EMAIL PROTECTED] wrote: I need to parse a fairly large XML
response file and would like some suggestions
on which XML module would work the best. We've been using the XML::Simple
Hope this helps you.
use strict;
use warnings;
open my $fh, '', infile.txt or die $!;
open my $ofh, '', outfile.txt or die $!;
local $/ = };;
my %printed;
my @a = $fh;
my @b = ();
foreach(@a){
if ($_ =~ m/(.*?)\_T\n/){
my $tomatch = $1;
my $cnt = grep /$tomatch/,@b;
Hi,
Hope this is what you are expecting.
#!/usr/bin/perl -w
($old_header,$old_atoms,$old_bonds) = mol2_read('prabu');
print @{$old_header} \n @{$old_atoms} \n @{$old_bonds};
sub mol2_read {
@mol2_header = ('prabu1','prabu12');
@mol2_atoms = ('prabu2');
@mol2_bonds =
Hi,
Hope this is what you are expecting.
#!/usr/bin/perl -w
($old_header,$old_atoms,$old_bonds) = mol2_read('prabu');
print @{$old_header} \n @{$old_atoms} \n @{$old_bonds};
sub mol2_read {
@mol2_header = ('prabu1','prabu12');
@mol2_atoms = ('prabu2');
@mol2_bonds =
Hi,
Hope this is what you are expecting.
#!/usr/bin/perl -w
($old_header,$old_atoms,$old_bonds) = mol2_read('prabu');
print @{$old_header} \n @{$old_atoms} \n @{$old_bonds};
sub mol2_read {
@mol2_header = ('prabu1','prabu12');
@mol2_atoms = ('prabu2');
@mol2_bonds =
Hi,
The GD module may not be installed properly.
if you are using active perl then did you install the module via ppm:
C:\ ppm
ppm install GD
if you didn't use activestate, then using cygwin.
perl -MCPAN -e 'install GD
if you are get installed the module in some other path then
you can use the Data::Dumper module to see the four dimension array values.
use Data::Dumper;
my @a = (
[
[
[ 0,0,0,0, 0,0,0,1 ],
[ 0,0,1,0, 0,0,1,1 ],
[ 0,0,2,0, 0,0,2,1 ],
Hello ,
Hope this helps you.
open(FILE2,+c:/writeto.txt);
my @text = FILE2;
@found = grep(/server_lib\.files/,@text);
$arsize=$#found+1;
if($arsize0)
{
print seen server_lib.files;
}
else
{
print not seen server_lib.files;
my $header = [server_lib.files];
print FILE2 \n;
print FILE2 $header;
On 6/16/06, Mark Martin [EMAIL PROTECTED] wrote:
Hi,
does anybody have the correct syntax for using a drop down list.
I'm using the object oriented type syntax for CGI. For example my text
boxes are printed thus :
$cgi = new CGI;
print $cgi-input({-type=text,-name=textbox01,-class=textbox})
On 6/14/06, Nath, Alok (STSD) [EMAIL PROTECTED] wrote:
Hi,
Need some help to run this script.
#!/usr/bin/perl -w
use CGI qw(:standard);
my $favourite = param(flavour) ;
print header; # here's a comment. print the header
print start_html(Alok's Page) , h1( Paragraph... !) ;
On 6/14/06, Mazhar [EMAIL PROTECTED] wrote:
Hello,
I am writing perl on windows installing Activestate Perl and the code is
reading a text file and processing it,
the code what i use is...
##
use strict;
use warnings;
my $file_name=.txt;
On 6/8/06, chen li [EMAIL PROTECTED] wrote:
Dear all,
How can I add a line (lines) to the following script
so that I can show the results on a new browser window
after I press the submit button?
Thanks,
Li
#!c:/Perl/bin/perl.exe
use warnings;
use strict;
use CGI;
my $query_obj=CGI-new();
44 matches
Mail list logo