Hi Brandon,
Just a note about your code:
On Saturday 16 October 2010 06:53:29 Brandon McCaig wrote:
> sub print_sum
> {
> my ($a, $b) = @_;
>
> print($a + $b, "\n");
> }
You should not call lexical variables "$a" and "$b" because this interferes
with the "$a" and "$b" http://perldoc.pe
On Fri, Oct 15, 2010 at 11:40 PM, Owen Chavez
wrote:
> I've started experimenting with the use of subroutines in place of large,
> repeating blocks of code in a few of my programs. Without exception, these
> subroutines require variables defined outside of the subroutine. Unless I'm
> mistaken,
> "OC" == Owen Chavez writes:
OC> I've started experimenting with the use of subroutines in place of
OC> large, repeating blocks of code in a few of my programs. Without
OC> exception, these subroutines require variables defined outside of
OC> the subroutine. Unless I'm mistaken, th
Hello,
I've started experimenting with the use of subroutines in place of large,
repeating blocks of code in a few of my programs. Without exception, these
subroutines require variables defined outside of the subroutine. Unless I'm
mistaken, the only way to make these variables available within
with
this construct, I'm sure it'll work.
--
Bob Erinkveld (Webmaster Insane Hosts)
www.insane-hosts.net
MSN: [EMAIL PROTECTED]
From: "Mariusz" <[EMAIL PROTECTED]>
To: "perl" <[EMAIL PROTECTED]>
Subject: declaring variables
Date: Thu, 12
Mariusz wrote:
>
> In one of my scripts I have lots of variables to declare. I wanted to type them in
>groups instead of one long line but I think dividing my lines trough the use of the
>ENTER key stops the script from working. (Although when I check the syntax through
>"perl - c script.cgi" i
In one of my scripts I have lots of variables to declare. I wanted to type them in
groups instead of one long line but I think dividing my lines trough the use of the
ENTER key stops the script from working. (Although when I check the syntax through
"perl - c script.cgi" it gives me OK).
Basica
c: Beginners (E-mail)
Subject: Re: Different ways of declaring variables
On Mon, 2002-05-13 at 18:07, Scott Lutz wrote:
> I am wondering about the different ways of initializing a single scalar.
>
> usual method:
> my $variable;
>
> but I am trying to get what (if anything) is b
On Mon, 2002-05-13 at 18:07, Scott Lutz wrote:
> I am wondering about the different ways of initializing a single scalar.
>
> usual method:
> my $variable;
>
> but I am trying to get what (if anything) is being done differently by
> this :
> my ($variable);
>
> Thanks!
>
>
> Scott Lutz
> Paci
I am wondering about the different ways of initializing a single scalar.
usual method:
my $variable;
but I am trying to get what (if anything) is being done differently by
this :
my ($variable);
Thanks!
Scott Lutz
Pacific Online Support
Phone: 604.638.6010
Fax: 604.638.6020
Toll Free: 1.877.5
10 matches
Mail list logo