Re: Perl DBI for SQL Server

2008-12-23 Thread Mike Munhall
> > Query 1 > > > Is it possible to use Perl DBI to connect to SQL Server? > I think all DBD drivers (mysql,Oracle,etc) need different syntax for > connect. > > Supposing I want to connect to database runnnig at 10.0.0.1 port 1433 and > schema name is "schema1" username and password to con

Recursive regular expression not working !

2008-12-23 Thread Amit Saxena
Hi all, I am trying to use recursive regular expression in Perl. I am using an example from http://www.perl.com/pub/a/2003/06/06/regexps.html. Whenever I try to execute the program, it hangs and I have to do a CNTRL-C to break it. Please let me know where I am wrong. *# cat t_r.pl* #! /usr/bin

Perl DBI for SQL Server

2008-12-23 Thread MGautam
Hi, Query 1 Is it possible to use Perl DBI to connect to SQL Server? I think all DBD drivers (mysql,Oracle,etc) need different syntax for connect. Supposing I want to connect to database runnnig at 10.0.0.1 port 1433 and schema name is "schema1" username and password to connect to datab

Re: copying a webpage and pasting to a text file

2008-12-23 Thread Chas. Owens
On Tue, Dec 23, 2008 at 11:30, Collaborate wrote: > I am wondering if there is a way to copy a webpage to a text file > using Perl. All I need is to copy as unformatted text. > > I would like to match certain strings on pages written in javascript > and to my understanding, www::mechnize does not

Re: What is the proper method for calling a shelll script?

2008-12-23 Thread Chas. Owens
On Tue, Dec 23, 2008 at 20:24, John W. Krahn wrote: > Chas. Owens wrote: >> >> On Tue, Dec 23, 2008 at 13:12, Steve Pittman wrote: >>> >>> Does any one have a good example? >> >> snip >> >> That depends on what you want to do. There are five common ways of >> executing external programs (includi

Re: What is the proper method for calling a shelll script?

2008-12-23 Thread John W. Krahn
Chas. Owens wrote: On Tue, Dec 23, 2008 at 13:12, Steve Pittman wrote: Does any one have a good example? snip That depends on what you want to do. There are five common ways of executing external programs (including shell scripts): 1. the system function* 2. the qx// operator** 3. the open

Re: What is the proper method for calling a shelll script?

2008-12-23 Thread Chas. Owens
On Tue, Dec 23, 2008 at 13:12, Steve Pittman wrote: > Does any one have a good example? snip That depends on what you want to do. There are five common ways of executing external programs (including shell scripts): 1. the system function* 2. the qx// operator** 3. the open function*** 4. the op

Re: copying a webpage and pasting to a text file

2008-12-23 Thread Gunnar Hjalmarsson
Collaborate wrote: I am wondering if there is a way to copy a webpage to a text file using Perl. use LWP::Simple; my $url = 'http://www.example.com/'; open my $fh, '>', 'webpage.txt' or die $!; print $fh get $url; -- Gunnar Hjalmarsson Email: http://www.gunnar.cc/cgi-bin/contac

RE: What is the proper method for calling a shelll script?

2008-12-23 Thread Gorrebeeck, Robert
Steve I just use a system command - which performs a fork first, so you can wait for the shell script to complete and then return to your perl script. You can also pass any parameters to the shell script if needed and retrieve them in your shell script Example: system("/homedir/test/bin/test.sh"

Re: Perl garbage collector

2008-12-23 Thread Jenda Krynicky
From: Patrick Kirsch > Jenda Krynicky schrieb: > > Why do you think weakref would help you? Do you have any cyclic data > > structures that are not getting released? Other than memory leaks > > like that, weakref is not gonna do anything about the memory > > footprint. See Devel::Leak to find o

Re: What is the proper method for calling a shelll script?

2008-12-23 Thread Stealth
On Tuesday 23 December 2008 01:12:52 pm Steve Pittman wrote: > Does any one have a good example? > > Best Regards, > > Steve You would do better to click on the list address instead of clicking reply and changing the subject line, like you did. Now your new subject and question are buried in ano

What is the proper method for calling a shelll script?

2008-12-23 Thread Steve Pittman
Does any one have a good example? Best Regards, Steve -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

Re: Perl garbage collector

2008-12-23 Thread Patrick Kirsch
Jenda Krynicky schrieb: > Why do you think weakref would help you? Do you have any cyclic data > structures that are not getting released? Other than memory leaks > like that, weakref is not gonna do anything about the memory > footprint. See Devel::Leak to find out if you have leaks. > As th

Re: Perl garbage collector

2008-12-23 Thread Patrick Kirsch
zentara schrieb: > Almost, the create/undef must be in the same scope ( block{} ). > This works, however, it can't be relied upon. > > #!/usr/bin/perl -w > use strict; > $| = 1; > print "$$\n"; #top -p $$ > > { > my $string; > for ( 1 .. 10 ) { > $string .= ( 'x' x 1000 ); >

Re: copying a webpage and pasting to a text file

2008-12-23 Thread Mr. Shawn H. Corey
On Tue, 2008-12-23 at 08:30 -0800, Collaborate wrote: > I am wondering if there is a way to copy a webpage to a text file > using Perl. All I need is to copy as unformatted text. > > I would like to match certain strings on pages written in javascript > and to my understanding, www::mechnize does

copying a webpage and pasting to a text file

2008-12-23 Thread Collaborate
I am wondering if there is a way to copy a webpage to a text file using Perl. All I need is to copy as unformatted text. I would like to match certain strings on pages written in javascript and to my understanding, www::mechnize does not work for this application. -- To unsubscribe, e-mail: beg

Re: Pod Usage Example

2008-12-23 Thread Stealth
On Tuesday 23 December 2008 10:05:24 am Mr. Shawn H. Corey wrote: > On Tue, 2008-12-23 at 20:16 +0530, Kelvin Philip wrote: > > When I call pod2usage(verbose => 2); the terminal is getting > > stuck. When I > > press CTRL+4, it comes out and displays the whole man page. > > Would you pls > > sugges

Re: Pod Usage Example

2008-12-23 Thread Mr. Shawn H. Corey
On Tue, 2008-12-23 at 20:16 +0530, Kelvin Philip wrote: > When I call pod2usage(verbose => 2); the terminal is getting stuck. > When I > press CTRL+4, it comes out and displays the whole man page. Would you > pls > suggest a solution for this issue? This sounds like a problem with your terminal em

Re: How to read email from Inbox

2008-12-23 Thread Chas. Owens
On Tue, Dec 23, 2008 at 07:47, sanket vaidya wrote: snip >>I think it's possible. >>Search "Gmail" on CPAN and you will get something. > > Thanks Jeff, I have searched CPAN & got a list of modules related to Gmail. > I will try that. snip Don't forget that Gmail provides POP3 and IMAP support, so

Re: Pod Usage Example

2008-12-23 Thread Kelvin Philip
Hi, Thanks for the help :-) When I call pod2usage(verbose => 2); the terminal is getting stuck. When I press CTRL+4, it comes out and displays the whole man page. Would you pls suggest a solution for this issue? Regards, Kelvin Philip On Tue, Dec 23, 2008 at 6:54 PM, Mr. Shawn H. Corey wrote:

Re: Pod Usage Example

2008-12-23 Thread Mr. Shawn H. Corey
On Tue, 2008-12-23 at 13:29 +0530, Kelvin Philip wrote: > Hi, > > Would someone guide me with a simple example for perl documentation using > Pod :: Usage? # Documentation levels my $DOC_USAGE = 0; my $DOC_HELP = 1; my $DOC_VER = 2; my $DOC_MAN = 3; # --

RE: How to read email from Inbox

2008-12-23 Thread sanket vaidya
-Original Message- From: yonghua.p...@gmail.com [mailto:yonghua.p...@gmail.com] On Behalf Of Jeff Peng Sent: Tuesday, December 23, 2008 5:30 PM To: sanket vaidya Cc: beginners@perl.org Subject: Re: How to read email from Inbox 2008/12/23 sanket vaidya : > > > Hi all, > > > > How can we r

Re: Perl garbage collector

2008-12-23 Thread Jenda Krynicky
From: Patrick Kirsch > Yes, I do have a problem with that situation. > There is an (huge) application written in Perl. It includes a couple of > modules from CPAN and does analyzing stuff. As a result the memory > footprint is (in my expectation) too high (I mean throwing hardware at > it does not

Re: How to read email from Inbox

2008-12-23 Thread Jeff Peng
2008/12/23 sanket vaidya : > > > Hi all, > > > > How can we read mail from inbox without using mail client like outlook? > Using perl. i.e. Is it possible to read Inbox of your gmail account using > perl? I think it's possible. Search "Gmail" on CPAN and you will get something. -- Jeff Peng ht

Re: How to read email from Inbox

2008-12-23 Thread Gary Stainburn
On Tuesday 23 December 2008 10:46:46 sanket vaidya wrote: > Hi all, > > How can we read mail from inbox without using mail client like outlook? > Using perl. i.e. Is it possible to read Inbox of your gmail account using > perl? > > Thanks & Regards, > > Sanket Vaidya > This is not something I've d

How to read email from Inbox

2008-12-23 Thread sanket vaidya
Hi all, How can we read mail from inbox without using mail client like outlook? Using perl. i.e. Is it possible to read Inbox of your gmail account using perl? Thanks & Regards, Sanket Vaidya http://www.patni.com World-Wide Partnerships. World-Class Solutions. _

Re: Pod Usage Example

2008-12-23 Thread Chas. Owens
On Tue, Dec 23, 2008 at 02:59, Kelvin Philip wrote: > Hi, > > Would someone guide me with a simple example for perl documentation using > Pod :: Usage? snip #!/usr/bin/perl use Getopt::Long; use Pod::Usage; my %opts; GetOptions( 'a' => \$opts{a}, 'b' => \$opts{b}, 'c' =>