Re: Difference between $ and $$ in function defn

2007-04-11 Thread Jason Roth
This is the prototype for the subroutine. $$ indicates it takes two scalars as arguments, and $ indicates it takes one. -Jason On 4/11/07, Nath, Alok (STSD) <[EMAIL PROTECTED]> wrote: Hi, What is the difference between this two function defs ? When there is $ and $$ ??

Difference between $ and $$ in function defn

2007-04-11 Thread Nath, Alok (STSD)
Hi, What is the difference between this two function defs ? When there is $ and $$ ?? sub test($$){ ... } sub test($){ ... } Thanks Ak -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mai

Re: Exporting Data to a file which can be read from Excel?

2007-04-11 Thread yitzle
This may not be the ideal solution, but did you consider CSV? If the spreadsheet does not need formulas, writing a CSV file is simple. Its basically a text file with columns seperated by commas and rows by newlines (or some varient). Excel opens CSV files nicely... On 4/11/07, Katie L. Barbee <[E

Exporting Data to a file which can be read from Excel?

2007-04-11 Thread Katie L. Barbee
I am really hoping you might be able to help me because I'm not sure where else to turn. I am trying to extract information from an Oracle database into an Excel Spreadsheet for individuals to view and I think I'm lost. Project: When someone logs into an admin area of a site, they would lik

Re: CGI Header

2007-04-11 Thread Tom Phoenix
On 4/11/07, Chas Owens <[EMAIL PROTECTED]> wrote: On 4/11/07, Tom Phoenix <[EMAIL PROTECTED]> wrote: > my $header_is_complete; # starts out false Is there a reason you are not using an our variable instead of a my variable: TIMTOWTDI. The scope is different, of course; but which scope one

Re: CGI Header

2007-04-11 Thread Chas Owens
On 4/11/07, Tom Phoenix <[EMAIL PROTECTED]> wrote: snip my $header_is_complete; # starts out false sub ensure_header { return if $header_is_complete; my($q) = @_; print $q->header(); $header_is_complete = 1; } snip Is there a reason you are not using an our variable inst

Re: Dialog and Tempfiles in Perl

2007-04-11 Thread Chas Owens
On 4/11/07, Rodrigo Tavares <[EMAIL PROTECTED]> wrote: Hello, I like to know, if exist anything as tempfile and dialog program in Perl. Both commands is include in shell script. Take a look at File::Temp* for tempfile. To my knowledge there is no direct replacement for dialog in Perl. You c

Re: Dialog and Tempfiles in Perl

2007-04-11 Thread Ken Foskey
On Wed, 2007-04-11 at 12:09 -0300, Rodrigo Tavares wrote: > Hello, > > I like to know, if exist anything as tempfile and http://search.cpan.org/~tjenness/File-Temp-0.18/Temp.pm > dialog program in Perl. http://search.cpan.org/~uncle/Dialog-0.03/Dialog.pod There are many other better solutions

Dialog and Tempfiles in Perl

2007-04-11 Thread Rodrigo Tavares
Hello, I like to know, if exist anything as tempfile and dialog program in Perl. Both commands is include in shell script. I produce a software in shell-script that create new databases in postgresql, define IP Address, Port Number, set permissions, test versions, replace fields and others. And

Re: CGI Header

2007-04-11 Thread Tom Phoenix
On 4/11/07, Jen mlists <[EMAIL PROTECTED]> wrote: But my error_report function is located in a package,not the main script. Then how to use a global variable for label it? You may use a true global by giving its full name, say $main::header_is_complete, even from another package and under '

Re: Using regular expressions with delimitaters

2007-04-11 Thread Chas Owens
On 4/11/07, Rodrigo Tavares <[EMAIL PROTECTED]> wrote: snip if ( "8.1.8" =~ /$version/) snip You are using the operators incorrectly. It should look like this: if ($version =~ /8\.1\.8/) The form is "variable binding_operator regex". Note that the periods need to be escaped otherwise they w

RE: Using regular expressions with delimitaters

2007-04-11 Thread Moon, John
From: Rodrigo Tavares [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 11, 2007 9:31 AM To: beginners@perl.org Subject: Using regular expressions with delimitaters Hello, I need to use the delimiter " " , (one blank space). I read perdoc, i try to use this : if ( "8.1.8" =~ /[\d $versao \s]/)

Using regular expressions with delimitaters

2007-04-11 Thread Rodrigo Tavares
Hello, I need to use the delimiter " " , (one blank space). I read perdoc, i try to use this : if ( "8.1.8" =~ /[\d $versao \s]/) But the expression is always true. Where is the error ? my code : #!/usr/bin/perl $version=`/usr/local/pgsql/bin/pg_ctl --version`; print $version; if ( "8.1.8" =

Re: Converting to log file to CSV

2007-04-11 Thread Rodrick Brown
On 4/11/07, Craig Schneider <[EMAIL PROTECTED]> wrote: Hi Guys Thanks for all the help with the directory sorting, I'm still very new to Perl :) I'm now trying to use Perl to convert the below log file to CSV. 1176301248.555180 dhr-hr3.duys.co.za TCP_MISS/200 447 GET http://support.duys.co

Converting to log file to CSV

2007-04-11 Thread Craig Schneider
Hi Guys Thanks for all the help with the directory sorting, I'm still very new to Perl :) I'm now trying to use Perl to convert the below log file to CSV. 1176301248.555180 dhr-hr3.duys.co.za TCP_MISS/200 447 GET http://support.duys.co.za/DUYSIT/WebResource.axd? - DIRECT/192.168.10.3 image/g

Re: CGI Header

2007-04-11 Thread Jen mlists
Thank you. But my error_report function is located in a package,not the main script. for example, package Myfunc; sub error_report { my($q,$msg) = @_; print $q->header(); # print or not print it?? print $msg; } 1; Then how to use a global variable for label it?Thanks. 2007/4/11, Tom P