HTML indentation not fine

2004-10-13 Thread Anish Kumar K.
I wrote a program which will replace all the hardcoded things to some values specific to one client. for example designed a template with This comes in two lines or so...I happen to saw some mail regarding indentation of HTML files...with some pacakge in perl..It would be nice if someone could

$_. and $_,

2004-10-13 Thread E.Horn
Hallo! Stupid question, but i am a perlbeginner! :-( What is the difference between $_. and $_, ?? Regards -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: $_. and $_,

2004-10-13 Thread Jose Alves de Castro
On Wed, 2004-10-13 at 10:48, E.Horn wrote: > Hallo! Hi. > Stupid question, but i am a perlbeginner! :-( > What is the difference between $_. and $_, ?? $_ is a variable (the context variable) A single dot is the concatenation operator A single comma is the list separator So: $_. isn't really "

Building an Array

2004-10-13 Thread Thomas Drought
Real Perl newbie question... I have a script that retrieves a response using HTTP:Request and HTTP:Response. I get back a response in the content as a URLEncoded string. For example 'id=101&results=passed' I would like to take this response, and parse it into an array where I can call each value

RE: Building an Array

2004-10-13 Thread Charles K. Clarkson
Thomas Drought <[EMAIL PROTECTED]> wrote: : Real Perl newbie question... : : I have a script that retrieves a response using HTTP:Request : and HTTP:Response. I get back a response in the content as a : URLEncoded string. For example 'id=101&results=passed' : : I would like to take this response

Re: HTML indentation not fine

2004-10-13 Thread Chris Devers
On Wed, 13 Oct 2004, Anish Kumar K. wrote: > I wrote a program which will replace all the hardcoded things to some > values specific to one client. for example designed a template with > http://learn.perl.org/>

Regex to match valid host or dns names

2004-10-13 Thread perl
Hi, How do I best test for a valid host name? My script will read from a file which contains IP addresses and/or dns name, so I'm trying to sort out valid IP addresses or host name (using regex). For some reason, my regex fails to match host names with one or more dash (-). IN the example below,

Re: How to process blank line delimeted blocks of text?

2004-10-13 Thread Tim Musson
Hey Luke, BL> Will this work? Yes, that did the trick, thanks! BL> { BL> local $/ = "\n\n"; BL> while () BL> { BL> for $line (split /\n/, $_) BL> { BL> # process lines in a dn section here BL> next unless $line =~ /^(dn:|member:|groupType:)/; BL> } BL> } BL> } -- Tim Mus

perl's equivalent for jpgraph (www.aditus.nu/jpgraph/)

2004-10-13 Thread quincy
greetings; any suggestion for perl's equivalent for jpgraph (www.aditus.nu/jpgraph/) ?

Re: Email Address Arguments

2004-10-13 Thread Errin Larsen
I figured it out. I thought I'd post what I found. > I've cobbled some code together to test stuff out with: > > #!/usr/bin/perl > > use warnings; > use strict; > > my @addresses; > my @message; > > if( @ARGV ) { > print "There are arguments\n"; > while( $ARGV[0] =~ /[EMAIL PR

Re: perl's equivalent for jpgraph (www.aditus.nu/jpgraph/)

2004-10-13 Thread Wiggins d Anconia
> > greetings; > > any suggestion for perl's equivalent for jpgraph (www.aditus.nu/jpgraph/) ? > A quick search of CPAN turns up some options. I have personally had success with GD::Graph. Don't know that it is as powerful (read: makes things as pretty) as the one you mention. Though since they

Re: cannot call a process via telnet

2004-10-13 Thread Christian Stalp
I just want you to know that the solution of my problem was to change the prompt! When I call the remote bash via telnet to change the directory it expacted the old prompt which was guilty while login: Prompt => '/\[datagate\]\/KOMM\/datagate > But after changing the directory the prompt was

RE: Regex:: using variables to hold replacement text

2004-10-13 Thread Radhika
Hi Bob, I tried what you suggested and I keep getting a unitialized value error. here is my code. If you could point me to how I could do what William is trying to do. Thanks Radhika $_= "goodbarrad"; #$foo =~ s/(.*)bar(.*)/$replacement/g; my $foo =~ s/(.*)bar(.*)/eval $1/ge; print "\$1 is: $1\n"

Re: Regex to match valid host or dns names

2004-10-13 Thread K.Prabakar
> example below, it fails to match "host-no.top-level" as a valid host > name. I modify the regex several times - but still don't get the right > outlook. > > my @hosts = qw(192.168.22.1 192.168.22.18 localhost another.host.domain > host-no.top-level my.host.domain.com); > foreach (@hosts){ >

RE: Regex:: using variables to hold replacement text

2004-10-13 Thread Bob Showalter
Radhika wrote: > Hi Bob, > I tried what you suggested and I keep getting a unitialized value > error. here is my code. If you could point me to how I could do what > William is trying to do. Sorry, I don't know what you're trying to do. Let's start over from the beginning. What are you trying to d

Re: Regex to match valid host or dns names

2004-10-13 Thread Steve Bertrand
> >> example below, it fails to match "host-no.top-level" as a valid host >> name. I modify the regex several times - but still don't get the >> right >> outlook. >> >> my @hosts = qw(192.168.22.1 192.168.22.18 localhost >> another.host.domain >> host-no.top-level my.host.domain.com); >> foreach (@

Re: Regex to match valid host or dns names

2004-10-13 Thread Randal L. Schwartz
> "Steve" == Steve Bertrand <[EMAIL PROTECTED]> writes: Steve> I'm just beginning to learn a bit about some of the more obscure Steve> regex's, but I'd like to ask if this following regex would ensure no Steve> IP's got trapped in the @dns array? (Assuming that no .tld ends in a Steve> \d): S

Re: Regex to match valid host or dns names

2004-10-13 Thread Randal L. Schwartz
> "K" == K Prabakar <[EMAIL PROTECTED]> writes: K> Try this > $_ =~ /^\w\w*-?\w+?[\.\w\w*-?\w+?]*$/ "Try" is usually a good clue to mean "This is not your solution". In this case, you've got all sorts of stuff going on in a character class. Wrong stuff. "Try" again. Please. -- Randal

RE: Regex to match valid host or dns names

2004-10-13 Thread Babale Fongo
Hi, My original regex to match ips is this: "$_ =~ /^\d{1,3}\.\d{1,3}\.\d{1,3}/;", which is ok. But matching dns name is still a problem. K.Prabakar's suggestion looks good but also failed the test: "$_ =~ /^\w\w*-?\w+?[\.\w\w*-?\w+?]*$/", It will match an invalid dns name like this (host-

What function to get a file thru HTTP

2004-10-13 Thread Dave Kettmann
Hi list, I have been doing some searching and I'm looking for a recomendation. I need to pull a file via HTTP in my perl script. Just looking for a good module to use. Most everything I have found has been for FTP. Not asking for code, just a recomendation :) Dave Kettmann NetLogic -- To unsub

RE: Regex to match valid host or dns names

2004-10-13 Thread Wiggins d Anconia
> Hi, > > My original regex to match ips is this: > "$_ =~ /^\d{1,3}\.\d{1,3}\.\d{1,3}/;", which is ok. But matching dns name > is still a problem. > For some definitions of "ok". Seen an IP like: 987.654.321.0 ?? Or how about, 255.255.255.255.1.3.4.5.6 ?? I am assuming you had at least fou

Re: What function to get a file thru HTTP

2004-10-13 Thread Wiggins d Anconia
> Hi list, > > I have been doing some searching and I'm looking for a recomendation. I need to pull a file via HTTP in my perl script. Just looking for a good module to use. Most everything I have found has been for FTP. Not asking for code, just a recomendation :) > > Dave Kettmann > NetLogic >

Re: What function to get a file thru HTTP

2004-10-13 Thread Chris Devers
On Wed, 13 Oct 2004, Dave Kettmann wrote: > I have been doing some searching and I'm looking for a recomendation. > I need to pull a file via HTTP in my perl script. Just looking for a > good module to use. Most everything I have found has been for FTP. Not > asking for code, just a recomendati

RE: What function to get a file thru HTTP

2004-10-13 Thread Dave Kettmann
Thanks Chris and Wiggins, will definately look into this. > -Original Message- > From: Chris Devers [mailto:[EMAIL PROTECTED] > Sent: Wednesday, October 13, 2004 1:57 PM > To: Dave Kettmann > Cc: Perl List (E-mail) > Subject: Re: What function to get a file thru HTTP > > > On Wed, 13 Oct

Re: Regex to match valid host or dns names

2004-10-13 Thread Dan Jones
On Wed, 2004-10-13 at 15:06, K.Prabakar wrote: > > example below, it fails to match "host-no.top-level" as a valid host > > name. I modify the regex several times - but still don't get the right > > outlook. > > > > my @hosts = qw(192.168.22.1 192.168.22.18 localhost another.host.domain > > host-n

Re: What function to get a file thru HTTP

2004-10-13 Thread JupiterHost.Net
Dave Kettmann wrote: Hi list, Howdy Dave :) I have been doing some searching and I'm looking for a recomendation. I need to pull a file via HTTP in my perl script. Just looking for a good module to use. Most everything I have found has been for FTP. Not asking for code, just a recomendation :) Tak

form content passing

2004-10-13 Thread Adamiec, Larry
Hello, I am having troubles getting started. I have a Unix (Solaris 9) cgi script which parses a form, processes the contents of the form, and then sends it to a Windows ASP script for more processing and insertion into a Access database. I haven't been able to determine the correct or most effi

Re: form content passing

2004-10-13 Thread JupiterHost.Net
&ReadParse; Oi, first off don't do this use CGI 'param'; instead then instead of $in{'hidden_2'} you get the value from param('hidden_2') So hidden_2 => $in{'hidden_2'} becomes my $hid2 = param('hidden_2'); ... hidden_2 => $hid2 See perldoc CGI for details Also: use strict; use warnings; always!!

Re: form content passing

2004-10-13 Thread Gunnar Hjalmarsson
Larry Adamiec wrote: I am having troubles getting started. I have a Unix (Solaris 9) cgi script which parses a form, processes the contents of the form, and then sends it to a Windows ASP script for more processing and insertion into a Access database. I haven't been able to determine the correct

Re: perl's equivalent for jpgraph (www.aditus.nu/jpgraph/)

2004-10-13 Thread Daniel Kasak
quincy wrote: greetings; any suggestion for perl's equivalent for jpgraph (www.aditus.nu/jpgraph/) ? I would be *very* interested to find out what you decide on, and a brief description of your reasoning. I'm a jpgraph user, and I'm migrating our Access database to gtk2-perl. Pretty soon I'm g

RE: Regex to match valid host or dns names

2004-10-13 Thread K.Prabakar
On Thu, 14 Oct 2004, K.Prabakar wrote: > On Wed, 13 Oct 2004, Babale Fongo wrote: > > > K.Prabakar's suggestion looks good but also failed the test: > > > > "$_ =~ /^\w\w*-?\w+?[\.\w\w*-?\w+?]*$/", > > > > It will match an invalid dns name like this (host-.domain.com) as a valid. > > I'm stil