Re: goto return ?

2006-11-25 Thread Paul Johnson
On Fri, Nov 24, 2006 at 05:37:35PM -0600, JupiterHost.Net wrote: > In a function I can do this: > > # stuff here > >if($whatever, @ret) { >one(); >two(); >goto &CORE::return; # this is pseudo code that does not work but > illustrates the idea of the goal >} > >

Problem with replacing string in file

2006-11-25 Thread perl pra
hi Gurus, I have a problem to replace strings of file thru perl script. Here is the problem in detail... I have a text file some thing like this.. PROJ_FOLER=C:\Proj PROJ_LOGS=C:\PROJ\LOGS I have same line in config file some thing like this. PROJ_FOLDER=D:\Proj PROJ_LOGS=D:\PROJ\LOGS.

Re: Problem with replacing string in file

2006-11-25 Thread D. Bolliger
perl pra am Samstag, 25. November 2006 13:40: > hi Gurus, > > I have a problem to replace strings of file thru perl script. [...] > I have a text file some thing like this.. > PROJ_FOLER=C:\Proj > PROJ_LOGS=C:\PROJ\LOGS > > I have same line in config file some thing like this. > PROJ_FOLDER=D:\Pro

Re: Problem with replacing string in file

2006-11-25 Thread Mumia W.
On 11/25/2006 06:40 AM, perl pra wrote: hi Gurus, I have a problem to replace strings of file thru perl script. Here is the problem in detail... I have a text file some thing like this.. PROJ_FOLER=C:\Proj PROJ_LOGS=C:\PROJ\LOGS I have same line in config file some thing like this. PR

Re: Problem with replacing string in file

2006-11-25 Thread Rob Dixon
Mumia W. wrote: On 11/25/2006 06:40 AM, perl pra wrote: Here is the code i have written... [snip] open $LOGFILE, '<', $file; while ($line1 = <$LOGFILE> ) { if ($line1 =~ m/$key/) { system("perl -i.bak -p -e 's/$line1/$repline/g' $file"); close $LOGFILE; last; } }

Re: postgres insert

2006-11-25 Thread Tom Allison
D. Bolliger wrote: Tom Allison am Donnerstag, 23. November 2006 16:13: [snipped some code] I get a STDERR warning printed out everytime this has a duplicate key violation... Any idea why eval{} doesn't suppress this? Hi Tom It'd be a bad idea... eval BLOCK adds the ability to catch runtime

Re: Why this error ?

2006-11-25 Thread Tom Phoenix
On 11/21/06, Mário Gamito <[EMAIL PROTECTED]> wrote: Can someone tell me please why i'm getting this error with this code ? I'm running PERL 5.6.0 on a AIX. If you're going to answer your own questions?! Seriously, when 5.6.0 was new, Bill Clinton was still President. Since you don't eve

Minimal DNS answer using Net::DNS

2006-11-25 Thread Kelly Jones
I've used xinetd to set up a test nameserver on port 1024. Here's the Net::DNS Perl I'm using to say (falsely) that news.yahoo.com resolves to 10.1.2.3 with a TTL of 1 day: $res = Net::DNS::Packet->new(); $rr = Net::DNS::RR->new("news.yahoo.com. 86400 A 10.1.2.3"); $res->push(answer => $rr); prin