RE: how to add support of Msql and CGI in Apache

2009-04-16 Thread Dermot Paikkos
You can choose whatever directory you like. On *nix machines it's usually on /var/www/cgi-bin, but it can be any directory you want. It might even be set-up to work by default. Try it. Stick your script into the script directory and point your browser at http://host/cgi-bin/youscript.pl, and see

Re: reading files c vs perl

2009-04-16 Thread John W. Krahn
Emen Zhao wrote: This is off topic. But I'm just curious about why 4096 is picked here. Is there any particular reason behind it? I guess you can even calc the lines like this - perl -0777 -wne 'print scalar ($_=~s/\n//g)' filename Except that it's slower than using tr///: $ time perl

perl script errors while connecting to sql server

2009-04-16 Thread perl pra
Hi Gurus, I need to connect to MSSQL SERVER (express edition on remote system) through a perl script. But I get the following error with the code below can any body help me in that. ERROR Use of uninitialized value $Win32::ODBC::ErrConn in concatenation (.) or string at

Perl Script Error : Can't call method execute_flow without a package or object reference

2009-04-16 Thread Fatema M
Hi, I am facing an error while executing the Perl script, its compilation fails with the following error Can't call method execute_flow without a package or object reference at addr Code Snippet: require 'test_data'; $SCRIPT_ID =

trouble with nested forks() (keep spawning twin process)

2009-04-16 Thread Michael Alipio
Hi, I have this code: die Could not fork command1! unless defined (my $command1_pid = fork); if ($command1_pid == 0){ open EXTERNAL_PROG1, external_prog1 | or die Can't run external_prog1; while (EXTERNAL_PROG1){ if (/pattern/){ die Could not fork command2 unless defined (my

Re: Match and split on array help with output

2009-04-16 Thread Dr.Ruud
Chas. Owens wrote: Dr.Ruud: p...@highdeck.com: /:\/\// Alternative: m~://~ What drove your choice of tildas here? Normally I would go for once of the matched delimiters (i.e. (), {}, [], or ). The tilde just happens to be one of my favourite regex delimiters. I see # being used a

Re: trouble with nested forks() (keep spawning twin process)

2009-04-16 Thread Jay Savage
On Thu, Apr 16, 2009 at 8:32 AM, Michael Alipio daem0n...@yahoo.com wrote: Hi, I have this code: die Could not fork command1! unless defined (my $command1_pid = fork); if ($command1_pid == 0){  open EXTERNAL_PROG1, external_prog1 | or die Can't run external_prog1;  while

Re: trouble with nested forks() (keep spawning twin process)

2009-04-16 Thread Chas. Owens
On Thu, Apr 16, 2009 at 08:32, Michael Alipio daem0n...@yahoo.com wrote: snip die Could not fork command1! unless defined (my $command1_pid = fork); I am going to number the processes here. 1 will be the first child, 1.1 will be the first child's child. if ($command1_pid == 0){ Only the

Re: reading files c vs perl

2009-04-16 Thread Emen Zhao
Thank you, Chas! This is great to know. I guess I got used to taking a plethora of memory as granted. :-) --Emen

Need some explanation about these lines.

2009-04-16 Thread Raheel Hassan
Hello, I have seen some Perl scripts where some times these lines are mentioned in the begining of the script can any body explain these lines. *Script-1* use DBI; # What is been called here. use Test::DB::DBAccess; use Test::DB::DBOps; *Script-2* package

Re: perl script errors while connecting to sql server

2009-04-16 Thread Jayesh Thakrar
From what I understand, the Express Edition of MS SQL Server does not support connections from remote machines/hosts out-of-the-box. Look up the Microsoft KB article and turn-on support for remote connections and then try. http://support.microsoft.com/kb/914277 -- Jayesh - Original

Re: reading files c vs perl

2009-04-16 Thread Emen Zhao
This is no surprise, regexp is a relatively heavy function, a lot of dirty work behind the scene. On Thu, Apr 16, 2009 at 2:13 PM, John W. Krahn jwkr...@shaw.ca wrote: Emen Zhao wrote: This is off topic. But I'm just curious about why 4096 is picked here. Is there any particular reason

Re: Need some explanation about these lines.

2009-04-16 Thread Chas. Owens
On Thu, Apr 16, 2009 at 11:14, Raheel Hassan raheel.has...@gmail.com wrote: Hello, I have seen some Perl scripts where some times these lines are mentioned in the begining of the script can any body explain these lines. *Script-1* use DBI;                                 # What is been

Re: Perl Script Error : Can't call method execute_flow without a package or object reference

2009-04-16 Thread Jim Gibson
On 4/15/09 Wed Apr 15, 2009 9:18 PM, Fatema M fsm1...@gmail.com scribbled: Hi, I am facing an error while executing the Perl script, its compilation fails with the following error Can't call method execute_flow without a package or object reference at addr Code Snippet: use

Re: Perl Script Error : Can't call method execute_flow without a package or object reference

2009-04-16 Thread Chas. Owens
2009/4/16 Jim Gibson jimsgib...@gmail.com: snip This calls the new method in package vpu and assigns the return value, which should be a blessed scalar of some type, usually a reference to a hash, but it could be any scalar. snip $vpu must be a blessed scalar in order to call methods on it.