HI Gurus,
I am opening a web page using win32::IEAutomation and clicking each link on
the page and reading data.(This page has 177 links).
The above processes occupy more memory, After some time the page is unable
to load and the script gives me READY STATE error.
I have used Wait
On Oct 29, 2007, at 5:21 PM, Tom Phoenix wrote:
I don't think that what the original poster
wants is even possible, but I can't see any reason to need it, either.
It's probably not necessary per se, as you can always do anything
using reference syntax, but it's awkward and requires lots of e
Playing around with this, indeed, proves it can be done:
#!/usr/bin/perl
use strict;
use warnings;
use Data::Alias;
my $hashref = { a => 5, b => 8};
alias my %hash = %{$hashref};
print $hash{a} , "\n";
prints 5. (And \%hash == $hashref evaluates true.)
I knew that Data::Alias existed -- it's me
Hi
I am referring to perldoc perlintro
my %fruit_color = ("apple", "red", "banana", "yellow");
You can use whitespace and the "=>" operator to lay them out more nicely:
my %fruit_color = (
apple => "red",
banana => "yellow",
);
On 10/29/2007 8:21 PM, Tom Phoenix wrote:
my %newhash = %{$hashref};
You have made a copy of the hash. I do not believe that that is what
the original poster wished, which I think would be a new hash that the
old reference points to. I don't think that what the original poster
wants is even pos
On Monday 29 October 2007 15:23, Aaron Priven wrote:
> I can do this:
>
> my $hashref = \%hash;
>
> But as near as I can tell, there is no way to do the reverse
> operation: making a "my %hash" that is an alias for a hash reference.
Correct. You can alias a package variable but not a lexical vari
On Mon, Oct 29, 2007 at 05:21:52PM -0700, Tom Phoenix wrote:
> On 10/29/07, Jeremy Kister <[EMAIL PROTECTED]> wrote:
> > On 10/29/2007 7:23 PM, Aaron Priven wrote:
> > > my $hashref = \%hash;
> > >
> > > But as near as I can tell, there is no way to do the reverse
> > > operation: making a "my %ha
On 10/29/07, Aaron Priven <[EMAIL PROTECTED]> wrote:
> I can do this:
>
> my $hashref = \%hash;
>
> But as near as I can tell, there is no way to do the reverse
> operation: making a "my %hash" that is an alias for a hash reference.
You mean, given a reference to a hash, create a named lexical ha
On 10/29/07, Jeremy Kister <[EMAIL PROTECTED]> wrote:
> On 10/29/2007 7:23 PM, Aaron Priven wrote:
> > my $hashref = \%hash;
> >
> > But as near as I can tell, there is no way to do the reverse
> > operation: making a "my %hash" that is an alias for a hash reference.
>
> my %newhash = %{$hashref};
lists user wrote:
> Hello,
>
> I want to do the things below:
>
> a) get all binded IPs on a redhat linux os.there are maybe more than
> one IP,like eth0,eth1,eth0:1 etc.
>
> b) for each IP,I need to know if it's a private network address (like
> 192.168.0.1) or a public network address.
>
> for th
sivasakthi wrote:
> On Mon, 2007-10-29 at 17:06 +0530, Kaushal Shriyan wrote:
>
>
>
>>
>>
>> #!/usr/bin/perl -w
>>
>> %states = ( "California","Sacramento", "Wisconsin","Madison", "New York",
>> "Albany");
>>
>> print "Capital of Californi
On 10/29/2007 7:23 PM, Aaron Priven wrote:
my $hashref = \%hash;
But as near as I can tell, there is no way to do the reverse
operation: making a "my %hash" that is an alias for a hash reference.
my %newhash = %{$hashref};
--
Jeremy Kister
http://jeremy.kister.net./
--
To unsubscribe, e
I can do this:
my $hashref = \%hash;
But as near as I can tell, there is no way to do the reverse
operation: making a "my %hash" that is an alias for a hash reference.
It's possible with a package variable:
#/usr/bin/perl
our %hash;
my $hashref = { a => 5 , b => 8 };
*hash = $hashref;
print
On Monday 29 October 2007 09:15, Kevin Viel wrote:
> I have a dataset of values for variables for subjects. Some subject
> have multiple records, requiring an average:
>
> ID Var1 Var2
> 1 1.0 2.0
> 1 2.0 1.5
>
> -
> 1 1.5 1.75
>
> If I collect the variables into an array, I
Hello,
we're trying to put together a SOAP::Lite application but keep getting this
error message:
===
soaptest.cgi: Element 'XMLRequest' can't be allowed in valid XML message. Died.
at /usr/lib/perl5/site_perl/5.8.8/SOAP/Lite.pm
On Oct 29, 6:42 am, [EMAIL PROTECTED] (Mike Tran) wrote:
> Hey all,
>
> I'm new with Perl and need help with this simple script. I'm still
> playing around with the script below to get a feel for Perl. My script
> below is incomplete and I'm doing an array within an array which is
> incorrect. Plea
Kevin Viel wrote:
I have a dataset of values for variables for subjects. Some subject have
multiple records, requiring an average:
ID Var1 Var2
1 1.0 2.0
1 2.0 1.5
-
1 1.5 1.75
If I collect the variables into an array, I can average the contents after I
have processed th
I have a dataset of values for variables for subjects. Some subject have
multiple records, requiring an average:
ID Var1 Var2
1 1.0 2.0
1 2.0 1.5
-
1 1.5 1.75
If I collect the variables into an array, I can average the contents after I
have processed the entire file. It w
"Beginner" schreef:
> my ($rows) = $dbh->selectrow_array("SELECT foo FROM bar where
> path=?",undef,q($name)) or die snip
Your q($name) creates the literal string $name.
my ($rows) =
$dbh->selectrow_array(
"SELECT foo FROM bar where path=?",
undef,
$name
John,
That is exactly what I wanted. Thanks for pointing out all those errors
for me and your help with the script. Appreciate the prompt respond.
Cheers,
Mike
-Original Message-
From: John W.Krahn [mailto:[EMAIL PROTECTED]
Sent: Monday, October 29, 2007 1:10 PM
To: Perl beginne
On Monday 29 October 2007 06:42, Mike Tran wrote:
> Hey all,
Hello,
> I'm new with Perl and need help with this simple script. I'm still
> playing around with the script below to get a feel for Perl. My
> script below is incomplete and I'm doing an array within an array
> which is incorrect. Plea
On 29 Oct 2007 at 10:55, Paul Lalli wrote:
> On Oct 29, 12:31 pm, [EMAIL PROTECTED] (Dr.Ruud) wrote:
> > "Beginner" schreef:
> >
> > > I am trying to insert a lots file paths into an SQLite table and am
> > > having trouble with filenames with apostrophes in.
> >
> > Use placeholders,
>
> Good ad
On Oct 29, 12:31 pm, [EMAIL PROTECTED] (Dr.Ruud) wrote:
> "Beginner" schreef:
>
> > I am trying to insert a lots file paths into an SQLite table and am
> > having trouble with filenames with apostrophes in.
>
> Use placeholders,
Good advice.
> so prepare/execute.
irrelevant advice, nothing to do
On 10/29/07, sivasakthi <[EMAIL PROTECTED]> wrote:
> How to check the file is modified or not?
If the file exists at all, it's been modified at least once. But you
seem to want to know something more.
If you want to know whether the file has been modified since a certain
time, you probably want
On 10/29/07, Ryan Dillinger <[EMAIL PROTECTED]> wrote:
> #!/usr/bin/perluse warnings;use strict;
>
> print "PID=$$\n";
> my $child = fork();die "Can't fork: $!" unless defined $child;
> if ($child > 0) { # parent process print "Parent process: PID=$$,
> child=$child\n";} else { # child process
"Rob Coops" schreef:
> See: http://search.cpan.org/~timb/DBI-1.601/DBI.pm#quote for more
> information
Read
http://search.cpan.org/~timb/DBI-1.601/DBI.pm#Placeholders_and_Bind_Values
first.
--
Affijn, Ruud
"Gewoon is een tijger."
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional c
"Beginner" schreef:
> I am trying to insert a lots file paths into an SQLite table and am
> having trouble with filenames with apostrophes in.
Use placeholders, so prepare/execute.
--
Affijn, Ruud
"Gewoon is een tijger."
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands,
Andrew Curry schreef:
> be very careful with exists, it auto creates the structure
> use Data::Dumper;
> my %hash;
> if (exists $hash{a}{b}) {}
> print Dumper(\%hash)
> then the next time you use exists it is there.
> defined is much safer as it doesnt do this.
No, the difference
On Monday 29 October 2007 07:29, Beginner wrote:
>
> while () {
> chomp;
> my @fields = split(/|/,$_);
^^^
> $exclude_bases{$F[0]} = 0; # $f[0] contains base_no
> }
> close(EXCLUDE);
>
> open(BASE,"base.txt")|| die("Could not open file!");
> while () {
Since I never worked with an SQLite DB I am not sure how well this will work
but you might want to have a look at the following command in the DBI:
$dbh->quote($value);
This should make the whole thing SQL approved with escaped special
characters and everything... Now as I said I have no idea how
On 29 Okt, 16:14, [EMAIL PROTECTED] (Beginner) wrote:
> Hi,
>
> I am trying to insert a lots file paths into an SQLite table and am
> having trouble with filenames with apostrophes in.
>
> Below is the snippet I have been using. I have experimented with
> sprintf, qq and a combination of both but
be very careful with exists, it auto creates the structure
i.e.
use Data::Dumper;
my %hash;
if (exists $hash{a}{b}) {
}
print Dumper(\%hash)
then the next time you use exists it is there.
defined is much safer as it doesnt do this.
-Original Message-
From: Beginner [mailto:[EMAIL PR
On 29 Oct 2007 at 8:42, Mike Tran wrote:
> Hey all,
>
>
>
> I'm new with Perl and need help with this simple script. I'm still
> playing around with the script below to get a feel for Perl. My script
> below is incomplete and I'm doing an array within an array which is
> incorrect. Please help
Hi,
I am trying to insert a lots file paths into an SQLite table and am
having trouble with filenames with apostrophes in.
Below is the snippet I have been using. I have experimented with
sprintf, qq and a combination of both but can't get a quoting system
that will get DBI to accept paths li
Hey all,
I'm new with Perl and need help with this simple script. I'm still
playing around with the script below to get a feel for Perl. My script
below is incomplete and I'm doing an array within an array which is
incorrect. Please help.
Here's what I want to do; I have to flat files (pi
Thank you, Tom, that is exactly what I was looking for!!
Thanks again!
-Greg
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/
On 10/29/07, Ryan Dillinger <[EMAIL PROTECTED]> wrote:
>
> #!/usr/bin/perluse warnings;use strict;
>
> print "PID=$$\n";
> my $child = fork();die "Can't fork: $!" unless defined $child;
> if ($child > 0) { # parent process print "Parent process: PID=$$,
> child=$child\n";} else { # child proces
Hello,
I have this script here:
#!/usr/bin/perluse warnings;use strict;
print "PID=$$\n";
my $child = fork();die "Can't fork: $!" unless defined $child;
if ($child > 0) { # parent process print "Parent process: PID=$$,
child=$child\n";} else { # child process my $ppid = getppid(); print
On Mon, 2007-10-29 at 17:06 +0530, Kaushal Shriyan wrote:
>
>
> #!/usr/bin/perl -w
>
> %states = ( "California","Sacramento", "Wisconsin","Madison", "New York",
> "Albany");
>
> print "Capital of California is " . $states{"California"} .
On Oct 29, 4:09 pm, [EMAIL PROTECTED] (Sivasakthi) wrote:
> Hi All,
>
> How to check the file is modified or not?
>
> Thanks,
> Siva
1. get the file's modify time using stat function
2. then compare that time with whatever time-date you have
lookout stat in `perldoc perlfunc` or here's the link:
Dr.Ruud wrote:
Consider MailTools: http://search.cpan.org/~markov/MailTools/
Thanks Dr.Rudd, looks useful to me.
Cheers,
Nigel
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/
Hi,
I have a sample code
#!/usr/bin/perl -w
%states = ( "California","Sacramento", "Wisconsin","Madison", "New York",
"Albany");
print "Capital of California is " . $states{"California"} . "\n\n";
###
Hi All,
How to check the file is modified or not?
Thanks,
Siva
On 10/28/07, Telemachus Odysseos <[EMAIL PROTECTED]> wrote:
> On 10/25/07, Chas. Owens <[EMAIL PROTECTED]> wrote:
> > From the sound of it what you want is in-place-editing:
> >
> > #!/usr/bin/perl -i
> >
> > use strict;
> > use warnings;
> >
> > while (<>) {
> > s/this/that/
> > }
> >
> > The
44 matches
Mail list logo