On 2020-05-26 23:39, Peter Pentchev wrote:
On Tue, May 26, 2020 at 07:16:54PM -0700, ToddAndMargo via perl6-users wrote:
On 2020-05-25 23:42, ToddAndMargo via perl6-users wrote:
HI All,

I am missing something here:


154:   # figure out the label
155:   say %CommandLine<backup_path>;
156:   if "%CommandLine<backup_path>".starts-with( "[" )  &&
157:      "%CommandLine<backup_path>".contains( "]" ) {


BACKUP:\MyDocsBackup\backup1
[snip]


Follow up:

This turned ot the be the same issue as the other on:

say %CommandLine<backup_path>;
BACKUP:\MyDocsBackup\backup1

Was not the actual case.  %CommandLine<backup_path>
was actually blank.

I need to start using `print` instead of `say` to
proof things.

Thank you all for the help and tips!

This is... strange. Are you really, really sure that the "say" and
the "print" were really used on the same variable with the same value?
And the value is supposed to be a (possibly undefined) string?
And when the value is an undefined string (and nothing changes it after
"say" is called on it), "say" outputs something that looks like
a valid path?

This would be really, really strange. I'd say it would qualify as a bug,
unless there is something else happening there.

Are you really, really, really sure that there is nothing between
the call to "say" and the place where you use the variable that could
change the value? Are you also really, really, really sure that you have
not mistyped one of the names? If so, is there a way you could create
a minimal example, a short program that, when run on your system, always
behaves this way, and post it (attach the source file, don't retype it)
in full, so that people can try to run it on their systems and see if
"say" really does something strange?

G'luck,
Peter


Hi Peter,

What you saw is what I had.  Originally, I
thought I just need a second pair of eyes
and that I thought I saw what I saw, which
does happen to me more times than I would like
to admit.

What tipped me off was when I put a second
duplicate (copy and paste) say line right under
the first and the second one returned nothing.
This made me go back and look at how I populated
the variable in question and I found I had made
several mistakes and, indeed, the variable was
blank.

The value say gave, where it was suppose to give
a blank, was actually a value collected from the
run line that was used to populate the variable
in question.

The real bugger is that when things like this
happen, my first suspicion is that it is me doing
something wrong and 99% of the time that is the
case, so I had no idea this would be a Raku issue.
I wasted a lot of time chasing the wrong rabbit
down the wrong hole.

Oh ya, and good luck reproducing this for the
developers.

-T

Reply via email to