Re: copying a webpage and pasting to a text file

2008-12-24 Thread Collaborate
On Dec 23, 3:34 pm, nore...@gunnar.cc (Gunnar Hjalmarsson) wrote: > 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 $!; >    

Re: using (dot) . with printf does not incur the results I expected

2008-12-24 Thread John W. Krahn
Richard wrote: what's wrong w/ this ? I used (dot) . to indicate the maximum length of each element in the print but last one does not print out in alinged format.. What am i missing? use warnings; use strict; my $yabal = 'truncated'; my $never = 'sai'; my $noway = 'han1'; my %never = qw(hi

Re: using (dot) . with printf does not incur the results I expected

2008-12-24 Thread Richard
Richard wrote: what's wrong w/ this ? I used (dot) . to indicate the maximum length of each element in the print but last one does not print out in alinged format.. What am i missing? use warnings; use strict; my $yabal = 'truncated'; my $never = 'sai'; my $noway = 'han1'; my %never = qw(hi

Re: read line in, print each line to separate file

2008-12-24 Thread John W. Krahn
Charlie Farinella wrote: On Wednesday 24 December 2008, Mr. Shawn H. Corey wrote: On Wed, 2008-12-24 at 13:16 -0500, Charlie Farinella wrote: I need to read in a file of 200 lines and print each out to a separate file. I've been stumbling with this, but I don't know how to name each outfile

Re: implementing algo

2008-12-24 Thread Jenda Krynicky
From: "Sharan Basappa" > I am implementing an algorithm that I have worked out in theory. The > algorithm is in the form of a flowchart. > The area where I am having problem is where the flow passes from a > lower decision block to higher one. > I can implement this using a do while block for such

using (dot) . with printf does not incur the results I expected

2008-12-24 Thread Richard
what's wrong w/ this ? I used (dot) . to indicate the maximum length of each element in the print but last one does not print out in alinged format.. What am i missing? use warnings; use strict; my $yabal = 'truncated'; my $never = 'sai'; my $noway = 'han1'; my %never = qw(hi how are you toda

Re: read line in, print each line to separate file

2008-12-24 Thread Charlie Farinella
On Wednesday 24 December 2008, Mr. Shawn H. Corey wrote: > On Wed, 2008-12-24 at 13:16 -0500, Charlie Farinella wrote: > > I need to read in a file of 200 lines and print each out to a separate > > file. > > > > I've been stumbling with this, but I don't know how to name each outfile > > indivi

Re: read line in, print each line to separate file

2008-12-24 Thread Mr. Shawn H. Corey
On Wed, 2008-12-24 at 13:16 -0500, Charlie Farinella wrote: > I need to read in a file of 200 lines and print each out to a separate > file. > > I've been stumbling with this, but I don't know how to name each outfile > individually. I was hoping to see 200 files named tx1 - tx200, but > inste

read line in, print each line to separate file

2008-12-24 Thread Charlie Farinella
I need to read in a file of 200 lines and print each out to a separate file. I've been stumbling with this, but I don't know how to name each outfile individually. I was hoping to see 200 files named tx1 - tx200, but instead I get tx1234. for 123 files and then it dies. H

Re: Recursive regular expression not working !

2008-12-24 Thread Mr. Shawn H. Corey
On Wed, 2008-12-24 at 21:42 +0530, Amit Saxena wrote: > However when I try to execute it even with the proper text, I get the > different output than anticipated. > I'm not surprised that the results are not what you expected. Capture variables, $1, $2, $3, ... are globals and cannot be used in

Re: Recursive regular expression not working !

2008-12-24 Thread Amit Saxena
On Wed, Dec 24, 2008 at 7:11 PM, Mr. Shawn H. Corey wrote: > On Wed, 2008-12-24 at 11:40 +0530, Amit Saxena wrote: > > 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

Re: implementing algo

2008-12-24 Thread Rob Dixon
Sharan Basappa wrote: > > I am implementing an algorithm that I have worked out in theory. The > algorithm is in the form of a flowchart. The area where I am having problem > is where the flow passes from a lower decision block to higher one. I can > implement this using a do while block for such

Re: implementing algo

2008-12-24 Thread Mr. Shawn H. Corey
On Wed, 2008-12-24 at 20:10 +0530, Sharan Basappa wrote: > Hi, > > I am implementing an algorithm that I have worked out in theory. The > algorithm is in the form of a flowchart. > The area where I am having problem is where the flow passes from a > lower decision block to higher one. > I can impl

implementing algo

2008-12-24 Thread Sharan Basappa
Hi, I am implementing an algorithm that I have worked out in theory. The algorithm is in the form of a flowchart. The area where I am having problem is where the flow passes from a lower decision block to higher one. I can implement this using a do while block for such flow. The issue is when mult

Re: Recursive regular expression not working !

2008-12-24 Thread Mr. Shawn H. Corey
On Wed, 2008-12-24 at 11:40 +0530, Amit Saxena wrote: > 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

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

2008-12-24 Thread Gunnar Hjalmarsson
Filip van der Meeren 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 (including shell scripts): 1. the system function* 2. the q

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

2008-12-24 Thread Filip van der Meeren
On 24 Dec 2008, at 02: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 (including shell scripts): 1. the sys

Re: Perl DBI for SQL Server

2008-12-24 Thread Jenda Krynicky
From: "Mike Munhall" > I've been using DBD::ODBC to connect to SQL Server 2005. The only problem > I've had is with the bind_param_inout_array method. That method does not > seem to be implemented in DBD::ODBC 1.17. > > my $dsn = 'schema1'; > my $dbuser = 'user'; > my $dbpass = 'pass'; > > my $d

Re: copying a webpage and pasting to a text file

2008-12-24 Thread Jenda Krynicky
From: "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 under