Embedding PERL code
[1/2] from: tim:johnsons-web at: 18-Aug-2001 9:44
On Sat, Aug 18, 2001 at 08:02:25AM -0500, john wrote:
> I have many handy routines written in PERL, like the sending of a file as
> an attachment.
>
> Rebol, or its function to mail an attachment is convoluted.
>
> Can I embed a PERL procedure, or do I need to call a PERL file to do so?
I believe that you can use system commands from 'Command, but not from
'Core. I only use core, so can only comment on that...
> Is there an easy way to send a file as attachment in Rebol? I looked at
> the ATTACH.R file and was totally confused by it.
Possibly, if you are using CGI protocol, you could "harness" a perl script
through a "refresh" tag... but let me attempt to make this following case:
Assuming that I am going to make use of attach.r: (and in fact I will soon)
I would copy the entire code by "hand", no copying and pasting!
I would at the same time, have the rebol shell open and would
be doing the following at the reb command line;
1)Using the 'help feature for any rebol function or word
that I didn't understand
2)Testing lines of code from attach.r at the command prompt
one line at a time, using "print mold", 'probe, and type?
By the time I was finished, I would have a greater understanding
of rebol, and of the structure of the script. I would
then implement the script, testing it, and then place it
in a "library", 'do'ing the library script when I needed
the attach feature.
Then it would be easy as perl :>)
I hope this helps.
tim
[2/2] from: john:thousand-hills at: 18-Aug-2001 8:02
I have many handy routines written in PERL, like the sending of a file as
an attachment.
Rebol, or its function to mail an attachment is convoluted.
Can I embed a PERL procedure, or do I need to call a PERL file to do so?
Is there an easy way to send a file as attachment in Rebol? I looked at
the ATTACH.R file and was totally confused by it.
John