On 10/27/21 05:19, Ralph Mellor wrote:
On 10/25/21 22:21, Ralph Mellor wrote:
You should be aiming to end up being able to write
something like the following three line Raku program:
use lib:from<Perl5> 'dir-where-your-new-module-is';
use your-new-module:from<Perl5>;
RmdirAndLoop 'junk', 1, 3;
And when that's working, aim at just two lines:
use your-new-module:from<Perl5>;
RmdirAndLoop 'junk', 1, 3;
(ie the `use lib:from<Perl5> 'dir-where-your-new-module-is';`
is untidy. You should make that statement redundant by just
putting your module in one of your Perl's `@INC` directories.)
----
If you get it down to two lines, you could then reasonably ask
how you might reduce it to one:
RmdirAndLoop 'junk', 1, 3;
That would make sense if you wanted the module (that this function
is in) to be automatically loaded each time that Rakudo starts so you
don't have to bother to explicitly load it, but instead just always have
it, and its functions, available by default.
Rather than explain how to do that (it's not as simple as it could be),
that refinement can wait until you get it down to two lines first.
love, -T
:)
Problem is the code I present here was the most difficult
part of the program. It is far easier just to leave the entire thing is
Perl 5.
But, you bet you sweet ... I am writing your directions down
in my keepers files! You really kicked it.
You would not happen to know how I could directly write
to FTP myself with Raku? The RFC for FTP is pretty easy
to follow. I just have to know how to open (and close)
the network connection