Re: Need dynamic variables help

2017-01-13 Thread ToddAndMargo
On 01/13/2017 08:14 AM, Brandon Allbery wrote: This is also true for Perl 5, aside from it using . instead of ~ for concatenation. An error I constantly make. It is indeed a . not a + in Perl 5. Thank you! -- ~~ Computers are like air conditioners. They

Re: Need dynamic variables help

2017-01-13 Thread Brandon Allbery
On Fri, Jan 13, 2017 at 4:33 AM, Todd Chester wrote: > Will "~" > always replace "+" for this, or only with a dynamic variable? > ~ is always string concatenation; + is never correct for strings unless you want to coerce the string to a number (which is what led to your

Re: Need dynamic variables help

2017-01-13 Thread Brandon Allbery
On Fri, Jan 13, 2017 at 4:33 AM, Todd Chester wrote: > I was using Perl5's string concatenation That uses ., not +. Quite a few other languages use + though. -- brandon s allbery kf8nh sine nomine associates allber...@gmail.com

Re: Need dynamic variables help

2017-01-13 Thread Siavash
But in Perl 5 `.` is string concatenation operator, not `+` On 2017-01-13 09:33:10 GMT, Todd Chester wrote: >> >> On Fri, Jan 13, 2017 at 10:01 AM, Todd Chester > > wrote: >> >> Hi All, >> >> I am trying to understand how to read

Re: Need dynamic variables help

2017-01-13 Thread Fernando Santagata
Hi, As Siavash pointed out, the Perl6 concatenation operator is '~'. On Fri, Jan 13, 2017 at 10:33 AM, Todd Chester wrote: > > > On Fri, Jan 13, 2017 at 10:01 AM, Todd Chester > wrote: > >> Hi All, >> >> I am trying to understand how to read

Re: Need dynamic variables help

2017-01-13 Thread Todd Chester
On Fri, Jan 13, 2017 at 10:01 AM, Todd Chester > wrote: Hi All, I am trying to understand how to read variables from the shell's environment. I am reading this:

Re: Need dynamic variables help

2017-01-13 Thread Siavash
Hi, `+` is addition operator: https://docs.perl6.org/routine/$PLUS_SIGN#(Operators)_infix_+ String concatenation operator is `~`: https://docs.perl6.org/routine/$TILDE#(Operators)_infix_~ So you should write: print "Perl Version = " ~ $*PERL ~ "\n"; Or use `say` or `put` to add a newline: say

Re: Need dynamic variables help

2017-01-13 Thread Fernando Santagata
Try: print "Perl Version = " ~ $*PERL ~ "\n"; or better: say "Perl Version = $*PERL"; OTH On Fri, Jan 13, 2017 at 10:01 AM, Todd Chester wrote: > Hi All, > > I am trying to understand how to read variables from the > shell's environment. I am reading this: > >