[regexp] Warnings on Backreferences

2006-03-06 Thread Adam W
Hello All, I'm using '-w' like any good hacker, but every time I try to use backreferences in my regexps, I get a warning "\1 better written as $1 at" I'm confused because, according to perlretut: "Although $1 and \1 represent the same thing, care should be taken to use matched variable

How to display database records in a web page !!!!

2006-03-06 Thread Madhu Kumar
Hi , I want to display database records as web page my database contains some entries and which i wanna write as a report in web page. I have written a code for it which fetches the data from database which i wil show u below: my requirement is to align each fields and dispaly them as a report .

Re: How to display database records in a web page !!!!

2006-03-06 Thread gustav
> > > Hi , I want to display database records as web page my database > contains some entries and which i wanna write as a report in web > page. > > I have written a code for it which fetches the data from database > which i wil show u below: my requirement is to align each fields and > dispaly the

Re: [regexp] Warnings on Backreferences

2006-03-06 Thread John W. Krahn
Adam W wrote: > Hello All, Hello, > I'm using '-w' like any good hacker, but every time I try to use > backreferences in my regexps, I get a warning "\1 better written as $1 > at" > > I'm confused because, according to perlretut: > "Although $1 and \1 represent the same thing, care shoul

Re: How to display database records in a web page !!!!

2006-03-06 Thread Hans Meier (John Doe)
Madhu Kumar am Montag, 6. März 2006 09.57: > Hi , Hi Madhu Kumar your problem is not perl, but html related, see below: > I want to display database records as web page my database > contains some entries and which i wanna write as a report in web > page. > > I have written a code for it which

Re: send mail with authentication and secure connection

2006-03-06 Thread Marco CENTEMERI
It works fine! Thanks Marco C. --- Original Message Sent: Wednesday 01 March 2006 9:01:14 PM To: "Perl Beginners" From: "Michael Weber" <[EMAIL PROTECTED]> Subject: send mail with authentication and secure connection > How about this: > > Net::SMTP::TLS - An

eval{}

2006-03-06 Thread Tom Allison
I ran into a potential problem when writing some code this weekend. I'm running a network socket to pick up data and then run it against a database connection before I return the response. Essentially it falls into a few steps: read from network read from database write to database do something

Re: eval{}

2006-03-06 Thread Chas Owens
On 3/6/06, Tom Allison <[EMAIL PROTECTED]> wrote: > The problem I run into is throwing the exceptions up to the top eval{} > structure when I need to communicate that something didn't work right > so I can provide feedback to the network client connection. > > I suppose I could try and rewrite the

Portal Authentication

2006-03-06 Thread Chico
I have a windows environment and wanted to make a web portal authentication with perl. What is the best way of doing this? I have an MSSQL database that I can connect to and would like to store usernames and encrypted passwords in it... thanks in advance! -- To unsubscribe, e-mail: [EMA

Re: Portal Authentication

2006-03-06 Thread Johannes Ernst
Use an OpenID / Yadis / LID library and let users "bring" their identity? That way, you don't need to do any password management yourself. There are plenty of Perl libraries. More info: http://yadis.org/ http://openid.net/ http://lid.netmesh.org/ http://netmesh.org/ On Mar 6,

Re: Portal Authentication

2006-03-06 Thread Chico
Was looking for some more traditional user/password authentication suggestions thanks for the links though. "Johannes Ernst" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Use an OpenID / Yadis / LID library and let users "bring" their identity? > That way, you don't need to do a

Problems with gt and lt

2006-03-06 Thread Tommy Grav
I have a code where I want to check wether a number is bigger than or smaller than some limits, $maxdet and $mindet. These two values are given on the command line using the Getopt::Long module. However it seems like the code evaluates the if statement as a string (since numbers between 20

Re: eval{}

2006-03-06 Thread Jay Savage
On 3/6/06, Tom Allison <[EMAIL PROTECTED]> wrote: > > I ran into a potential problem when writing some code this weekend. > > I'm running a network socket to pick up data and then run it against a > database connection before I return the response. Essentially it falls > into a few steps: > > read

Re: [regexp] Warnings on Backreferences

2006-03-06 Thread Adam W
John W. Krahn wrote: Adam W wrote: Here is an example of one of my regexps that produces this warning: $text =~ s!(.*?)(\()(.*?)(\))!\1<\/a>!g; BTW, why capture $2 and $4 if you are not using them and why is everything backslashed? Since I'm relatively new to the language, most of my reg

Re: [regexp] Warnings on Backreferences

2006-03-06 Thread JupiterHost.Net
$text =~ s!(.*?)\((.*?)\)!$1!g; Thanks for the help and the more streamlined regexp. An even better way (see O'reilley's "Perl Best Practices" by Damian Conway - buy this book you will write better code) Is to make it extremely readable with xms :) Same exact regex as above: $test =~

Perl and Webs Services

2006-03-06 Thread Colin Robinson
Hi all, I have been using Perl for a few months now for basic tasks like file parsing etc but now need to be able to access my Perl scripts via a web service. I have installed SOAP::lite and have found loads of examples of how to consume web services from Perl and articles on creating WSDL files

Re: [regexp] Warnings on Backreferences

2006-03-06 Thread Adam W
JupiterHost.Net wrote: $text =~ s!(.*?)\((.*?)\)!$1!g; Thanks for the help and the more streamlined regexp. An even better way (see O'reilley's "Perl Best Practices" by Damian Conway - buy this book you will write better code) Is to make it extremely readable with xms :) Same exact

Re: [regexp] Warnings on Backreferences

2006-03-06 Thread John W. Krahn
JupiterHost.Net wrote: > Adam W wrote: >> John W. Krahn wrote: >> >>> $text =~ s!(.*?)\((.*?)\)!$1!g; >> >> >> Thanks for the help and the more streamlined regexp. > > An even better way (see O'reilley's "Perl Best Practices" by Damian > Conway - buy this book you will write better code) > > Is t

Re: [regexp] Warnings on Backreferences

2006-03-06 Thread John W. Krahn
Adam W wrote: > JupiterHost.Net wrote: >> >>> $text =~ s!(.*?)\((.*?)\)!$1!g; >>> >>> >>> Thanks for the help and the more streamlined regexp. >> >> >> An even better way (see O'reilley's "Perl Best Practices" by Damian >> Conway - buy this book you will write better code) >> >> Is to make it

Re: [regexp] Warnings on Backreferences

2006-03-06 Thread JupiterHost.Net
$test =~ s{ (.*?) [(] (.*?) [)] } {$1}xmsg; Just a .02 via an FYI :) That looks pretty cool. Using 'x' allows whitespace use, correct? Correct. And 'm' and 's' are ways of telling Perl how to interpret a line, right? The /m option defines what the ^ and $ anchors match

Re: [regexp] Warnings on Backreferences

2006-03-06 Thread John W. Krahn
JupiterHost.Net wrote: >> >>> And 'm' and 's' are ways of telling Perl how to interpret a line, right? >> >> The /m option defines what the ^ and $ anchors match but you aren't using >> those anchors. The /s option defines what . matches so your regular >> expression will match something different

Re: Problems with gt and lt

2006-03-06 Thread John W. Krahn
Tommy Grav wrote: > I have a code where I want to check wether a number is bigger than or > smaller than some limits, $maxdet and $mindet. These two values are > given on the command line using the Getopt::Long module. > > However it seems like the code evaluates the if statement as a string >

Re: eval{}

2006-03-06 Thread Tom Allison
Jay Savage wrote: die on errors and just keep passing them up the line: eval { eval { eval { bad_system_call() or die "$!\n"; } or die $@; } or die $@; }; print "eval says: [EMAIL PROTECTED]" if $@; As long as you keep propa

Re: eval{}

2006-03-06 Thread Tom Phoenix
On 3/6/06, Tom Allison <[EMAIL PROTECTED]> wrote: > Will 'die' by itself propogate the contents of $@ ad infinitum? Well, not ad infinitum. But it will propagate, according to perldoc's entry on die(). Cheers! --Tom Phoenix Stonehenge Perl Training -- To unsubscribe, e-mail: [EMAIL PROTECTED] F

Re: [regexp] Warnings on Backreferences

2006-03-06 Thread Hans Meier (John Doe)
John W. Krahn am Dienstag, 7. März 2006 00.12: > Adam W wrote: > > JupiterHost.Net wrote: > $text =~ s!(.*?)\((.*?)\)!$1!g; [...] > >> Same exact regex as above: > >> > >> $test =~ s{ (.*?) [(] (.*?) [)] } > >> {$1}xmsg; [...] > > Can you tell me what the function of the squar

Re: [regexp] Warnings on Backreferences

2006-03-06 Thread John W. Krahn
Hans Meier (John Doe) wrote: > John W. Krahn am Dienstag, 7. März 2006 00.12: >>Adam W wrote: >>>JupiterHost.Net wrote: >>$text =~ s!(.*?)\((.*?)\)!$1!g; > [...] Same exact regex as above: $test =~ s{ (.*?) [(] (.*?) [)] } {$1}xmsg; > [...] >>>Can you tell me w