Can you please take this very interesting question (and the rest the
answers) to StackOverflow?
Cheers
JJ
On Tue, May 1, 2018 at 4:49 AM, ToddAndMargo wrote:
> .sub is a method call and I can't write them. They come with Perl.
>
You can write them. But they are 'method', not 'sub', and must be defined
within a class.
If you put 'is export' on a method so defined, it can become a sub at the
same ti
On 04/30/2018 06:20 AM, Elizabeth Mattijsen wrote:
On 30 Apr 2018, at 15:04, ToddAndMargo wrote:
Hi All,
I am confused.
With this sub:
sub odd( $Num ) { return $Num % 2; }
Why does this work:
if odd $LineNum
{ $PartsStr ~= ''; } # Green
else { $PartsStr ~=
On 04/30/2018 07:15 AM, Bruce Gray wrote:
On Apr 30, 2018, at 8:04 AM, ToddAndMargo wrote:
Hi All,
I am confused.
With this sub:
sub odd( $Num ) { return $Num % 2; }
Why does this work:
if odd $LineNum
{ $PartsStr ~= ''; } # Green
else { $PartsStr ~= '';
> On Apr 30, 2018, at 8:04 AM, ToddAndMargo wrote:
>
> Hi All,
>
> I am confused.
>
> With this sub:
>
>sub odd( $Num ) { return $Num % 2; }
>
>
> Why does this work:
>
> if odd $LineNum
> { $PartsStr ~= ''; } # Green
>else { $PartsStr ~= ''; } # Purple
>
>
> On 30 Apr 2018, at 15:04, ToddAndMargo wrote:
>
> Hi All,
>
> I am confused.
>
> With this sub:
>
>sub odd( $Num ) { return $Num % 2; }
>
>
> Why does this work:
>
> if odd $LineNum
> { $PartsStr ~= ''; } # Green
>else { $PartsStr ~= ''; } # Purple
>
> And
Hi All,
I am confused.
With this sub:
sub odd( $Num ) { return $Num % 2; }
Why does this work:
if odd $LineNum
{ $PartsStr ~= ''; } # Green
else { $PartsStr ~= ''; } # Purple
And this one throw an error:
if $LineNum.odd
{ $PartsStr ~= ''