Re: Strings and Operators
From: dna (magmalianathotmaildotcom)
Date: 02/20/04
- Previous message: Mike Richardson: "A bit off topic: The Barclays Bank scam"
- In reply to: JamesW: "Strings and Operators"
- Next in thread: dna: "Re: Strings and Operators"
- Reply: dna: "Re: Strings and Operators"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Fri, 20 Feb 2004 09:23:15 -0500
this problem relates to operator/list precedence with and without
parenthesis.
for a good reference please read through 'perlop' in the perldocs. you will
be enlightened!
good luck
"JamesW" <gingaloon@hotmail.com> wrote in message
news:27d2bd1f.0402200049.d224c35@posting.google.com...
> Sorry if this occurs twice, my nicely typed one just vanished. Anyway in
brief:
>
> I want to store a range in a string, e.g. '2-5'.
>
> I tried $range = $numOne.'-'.$numTwo+1;
>
> And $range stored the sum of $numOne+1!
> I got it to work with,
>
> $range = $numOne.'-'.($numTwo+1);
>
> I understand why this works not not why my initial instinct didn't.
> Could someone please enlighten me?
>
> Thanks
> James
- Previous message: Mike Richardson: "A bit off topic: The Barclays Bank scam"
- In reply to: JamesW: "Strings and Operators"
- Next in thread: dna: "Re: Strings and Operators"
- Reply: dna: "Re: Strings and Operators"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|