Re: 32 bit computation problems with Perl !

2008-09-16 Thread Amit Saxena
On Tue, Sep 16, 2008 at 5:04 PM, John W. Krahn <[EMAIL PROTECTED]> wrote: > Amit Saxena wrote: > >> Hi all, >> > > Hello, > > In the following code, the value of "$string" in last two cases is not >> printed correctly. >> >> Please let me know what i am missing over here. >> >> *# cat l3.pl* >> #

Re: Extract url and text from a website

2008-09-16 Thread Alan Haggai Alavi
Hi, Do not use regular expressions to parse HTML. Regexps will break at some point. Use HTML::Parser. Regards, Alan Haggai Alavi. -- The difference makes the difference. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: 32 bit computation problems with Perl !

2008-09-16 Thread John W. Krahn
Amit Saxena wrote: On Tue, Sep 16, 2008 at 5:04 PM, John W. Krahn <[EMAIL PROTECTED]> wrote: Amit Saxena wrote: In the following code, the value of "$string" in last two cases is not printed correctly. Please let me know what i am missing over here. *# cat l3.pl* #! /usr/bin/perl $ONE_

Re: Extract url and text from a website

2008-09-16 Thread Peter Scott
On Mon, 15 Sep 2008 08:35:34 -0700, [EMAIL PROTECTED] wrote: > I'm trying to parse a webpage and obtain the urls and text contained > within the anchor tags. I've looked at various pages such as Mechanize > and TokeParser, but they don't seem to do what I want. Basically, what > I have is > a webpa

Re: How to open a prorgam and stay in it until done..

2008-09-16 Thread JMJ
On Sep 15, 10:15 pm, [EMAIL PROTECTED] (Jeff Pang) wrote: > 2008/9/15 JMJ <[EMAIL PROTECTED]>: > > > I need to open a program which I decided to use system but how do I > > stay in there and use variables to populate. > > use a open: > > open HD, "external_command|" or die $!; > while() { >     my

Re: 32 bit computation problems with Perl !

2008-09-16 Thread Amit Saxena
On Tue, Sep 16, 2008 at 7:07 PM, John W. Krahn <[EMAIL PROTECTED]> wrote: > Amit Saxena wrote: > >> On Tue, Sep 16, 2008 at 5:04 PM, John W. Krahn <[EMAIL PROTECTED]> wrote: >> >>> >>> Amit Saxena wrote: >>> In the following code, the value of "$string" in last two cases is not prin

Re: How to open a prorgam and stay in it until done..

2008-09-16 Thread JMJ
On Sep 15, 10:15 pm, [EMAIL PROTECTED] (Jeff Pang) wrote: > 2008/9/15 JMJ <[EMAIL PROTECTED]>: > > > I need to open a program which I decided to use system but how do I > > stay in there and use variables to populate. > > use a open: > > open HD, "external_command|" or die $!; > while() { >     my

Re: How to open a prorgam and stay in it until done..

2008-09-16 Thread Kenneth Wolcott
Use the Expect module if the password is being handled below the tty layer. Ken Wolcott On Tue, Sep 16, 2008 at 6:29 AM, JMJ <[EMAIL PROTECTED]> wrote: > On Sep 15, 10:15 pm, [EMAIL PROTECTED] (Jeff Pang) wrote: > > 2008/9/15 JMJ <[EMAIL PROTECTED]>: > > > > > I need to open a program which I dec

Re: 32 bit computation problems with Perl !

2008-09-16 Thread John W. Krahn
Amit Saxena wrote: Are you working on 64 bit system ? No. John -- Perl isn't a toolbox, but a small machine shop where you can special-order certain sorts of tools at low cost and in short order.-- Larry Wall -- To unsubscribe, e-mail: [EMAIL PROTECTED] For addit

HTTP Redirects

2008-09-16 Thread Nigel Peck
Hi all, I'm missing something here with regards http redirects. I'm trying to have my script redirect to itself through the browser so that the URL changes in the browser. When I send the headers myself: print 'Location: ' . $_[0] . "\n"; print 'Connection: close' . "\n\n";

Re: HTTP Redirects

2008-09-16 Thread Rob Dixon
Nigel Peck wrote: > > I'm missing something here with regards http redirects. > > I'm trying to have my script redirect to itself through the browser so that > the URL changes in the browser. > > When I send the headers myself: > > print 'Location: ' . $_[0] . "\n"; > print 'Connec

Re: HTTP Redirects

2008-09-16 Thread Mr. Shawn H. Corey
On Tue, 2008-09-16 at 18:37 +0100, Nigel Peck wrote: > Hi all, > > I'm missing something here with regards http redirects. > > I'm trying to have my script redirect to itself through the browser so that > the URL changes in the browser. > > When I send the headers myself: > > print 'Loca

Re: How to open a prorgam and stay in it until done..

2008-09-16 Thread Kenneth Wolcott
Hi; What reasoning have you been given stating that you cannot use this module? If it is because you cannot become root to install the Expect module, then you can install in an alternate location. Ken Wolcott On Tue, Sep 16, 2008 at 10:38 AM, Jerrianna Fox <[EMAIL PROTECTED]>wrote: > Thats

retreive numbers from alpha-numeric string

2008-09-16 Thread cancer
Hi, I am using Perl on Linux server. I m writing a code which will tell us the Linux distro with version. For this the command is cat /etc/issue which is common for all the distributions of linux. But the output varies for different distributions. For e.g. SUSE Welcome to openSUSE 11.0 (X86-6

Re: HTTP Redirects

2008-09-16 Thread Nigel Peck
Mr. Shawn H. Corey wrote: # Get the computer to tell you what's happening ... Rob Dixon wrote: The only way to fully understand what CGI does is to read its code. Perl modules ... Thanks both for your responses. It turns out I need to send the full URL whereas I was sending a relative URL w

Help with comparison of variable

2008-09-16 Thread Jim
How come this does not work? if ($file_list =~ $file_to_excl) I expect this to be true if $file_list contains the string in $file_to_excl - what am I missing? I also tried if ($file_list =~ m/($file_to_excl)/) any help? -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e

Output files to text document

2008-09-16 Thread Vb
What I'm trying to do is to create a program that reads through a certain directory and outputs the location of each file(both in the directory and subdirectorys) into a text file. I am completely new to Perl and under a time restriction so any help would be greatly appreciated...thanks in advance

Re: Output files to text document

2008-09-16 Thread Jack Gates
On Tuesday 16 September 2008 12:50:32 pm Vb wrote: > What I'm trying to do is to create a program that reads through a > certain directory and outputs the location of each file(both in the > directory and subdirectorys) into a text file. I am completely new to > Perl and under a time restriction so

Re: Help with comparison of variable

2008-09-16 Thread John W. Krahn
Jim wrote: How come this does not work? if ($file_list =~ $file_to_excl) What strings are in $file_list and $file_to_excl? I expect this to be true if $file_list contains the string in $file_to_excl - what am I missing? It won't work correctly if $file_to_excl is longer than $file_list or

Re: Output files to text document

2008-09-16 Thread John W. Krahn
Vb wrote: What I'm trying to do is to create a program that reads through a certain directory and outputs the location of each file(both in the directory and subdirectorys) into a text file. I am completely new to Perl and under a time restriction so any help would be greatly appreciated...thanks

Re: retreive numbers from alpha-numeric string

2008-09-16 Thread Mr. Shawn H. Corey
On Tue, 2008-09-16 at 08:28 -0700, cancer wrote: > Hi, > I am using Perl on Linux server. I m writing a code which will tell > us the Linux distro with version. For this the command is > > cat /etc/issue > > which is common for all the distributions of linux. But the output > varies for differen

Re: How to open a prorgam and stay in it until done..

2008-09-16 Thread Kenneth Wolcott
Hi; I don't know of any other way to exchange data beneath the tty layer other than TCL+Expect or Perl+Expect in an automated/asynchronous manner on UNIX/Linux. If you are on Windows maybe there is something but I don't know of it. Perhaps somebody on Perl Monks (http://www.perlmonks.org/) mi

Re: HTTP Redirects

2008-09-16 Thread Rob Dixon
Nigel Peck wrote: > Mr. Shawn H. Corey wrote: >> # Get the computer to tell you what's happening >> ... > > Rob Dixon wrote: >> The only way to fully understand what CGI does is to read its code. Perl >> modules >> ... > > Thanks both for your responses. It turns out I need to send the full URL

Formatting Question

2008-09-16 Thread andrewmchorney
Hello I am sure the answer to this question is very simple. I have a number value which I am inserting into a string I am building. How can I append the number into the string so that it will always be 2 characters in length? In other words if the month is 9, how can I make it appear as "09"?

Re: Formatting Question

2008-09-16 Thread Mr. Shawn H. Corey
On Tue, 2008-09-16 at 17:32 -0700, [EMAIL PROTECTED] wrote: > Hello > > I am sure the answer to this question is very simple. I have a number value > which I am inserting into a string I am building. How can I append the number > into the string so that it will always be 2 characters in length?

Re: Formatting Question

2008-09-16 Thread Dermot
2008/9/17 <[EMAIL PROTECTED]>: > Hello > > I am sure the answer to this question is very simple. I have a number value > which I am inserting into a string I am building. How can I append the number > into the string so that it will always be 2 characters in length? In other > words if the mont

Re: How to open a prorgam and stay in it until done..

2008-09-16 Thread Kenneth Wolcott
On Tue, Sep 16, 2008 at 4:40 PM, Sweet J <[EMAIL PROTECTED]> wrote: > > This is on a windows environment.. But we will be doing the same thing on > Linux as well... > > Hi; Please send your responses to the list, not just to me. I don't think I'm able to assist you further. I'm sorry that

Re: Formatting Question

2008-09-16 Thread John W. Krahn
[EMAIL PROTECTED] wrote: Hello Hello, I am sure the answer to this question is very simple. I have a number value which I am inserting into a string I am building. How can I append the number into the string so that it will always be 2 characters in length? In other words if the month is 9, h

Re: retreive numbers from alpha-numeric string

2008-09-16 Thread Alan C
On Tue, Sep 16, 2008 at 8:28 AM, cancer <[EMAIL PROTECTED]> wrote: > Hi, > I am using Perl on Linux server. I m writing a code which will tell > us the Linux distro with version. For this the command is > > cat /etc/issue > > which is common for all the distributions of linux. Slackware :-) [

web pages

2008-09-16 Thread Adams Paul
Hello everyone, I am still trying to change to different web pages in a browser.I have tried the following code: #!/usr/bin/perluse warnings;use strict;use LWP::Simple;system ("start iexplore \"my$url\"");sub main (for my$URL ('http://www.google.com','http://www.yahoo.com','http://www.msn.co