Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: Perligata array indices

by TheDamian (Vicar)
on Jul 02, 2016 at 04:01 UTC ( [id://1167031]=note: print w/replies, xml ) Need Help??


in reply to Perligata array indices

Did you try:
use Lingua::Romana::Perligata 'converte';
at the start of the program, to be shown precisely how it's converting the Latinate code to Perl?

When I do that on your source under Perl 5.20, I get (after perltidy-ing it):

use strict; use warnings; $_ = Lingua::Romana::Perligata::getline(*STDIN); @_ = split( " ", $_ ); my (@ap) = split( " ", $_ ); my $i = 0; my $m = Lingua::Romana::Perligata::__lastelem__(@_); for $_ ( Lingua::Romana::Perligata::__enlist__( 0, $m ) ) { print( STDOUT $_, " " ); print( STDOUT $_[$_], " " ); } print( STDOUT "\n" ); my (@b); my $v; for $v ( Lingua::Romana::Perligata::__enlist__( 0, $m ) ) { print( STDOUT $v, " " ); print( STDOUT $ap[$v], " " ); $b[$v] = $ap[$v]; } print( STDOUT "\n" ); for $_ (@_) { print( STDOUT $_, " " ) } print( STDOUT "\n" ); for $_ (@b) { print( STDOUT $_ ) }
which appears to be exactly equivalent to your comments on the right.

If 'converte' produces the same code for you, then that's literally what Perligata is actually executing.

If it doesn't produce the same code, then it's a puzzle (maybe related to the version of Perl and/or Perligata you're using?)

Replies are listed 'Best First'.
Re^2: Perligata array indices
by msh210 (Monk) on Jul 05, 2016 at 17:13 UTC

    Nope, I get:

    use strict ; use warnings ; $_ = IO::Handle::getline (*STDIN ); @_ = split ( " ", $_); my (@ap ) = split ( " ", $_); my $i = 0; my $m = Lingua::Romana::Perligata::__lastelem__ ( @_); for $_ (Lingua::Romana::Perligata::__enlist__ ( 0, $m)) {print (STDOUT + $_, " "); print (STDOUT $_, " ")} ; print (STDOUT "\n"); my (@b ); my $v ; for $v (Lingua::Romana::Perligata::__enlist__ ( 0, $m)) {print (STDOUT + $v, " "); print (STDOUT $v, " "); $v = $v} ; print (STDOUT "\n"); for $_ (@_) {print (STDOUT $_, " ")} ; print (STDOUT "\n"); for $_ (@b) {print (STDOUT $_)}

    Note that I'm running perl 5, version 20, subversion 2 (v5.20.2) built for MSWin32-x64-multi-thread and use Lingua::Romana::Perligata 9999999999999 tells me this is only version 0.50.

    $_="msh210";$"=$\;@_=@{[split//,uc]}[2,0];$_="@_$\1";$\=$/;++$_[0]for$...1;print lc substr crypt($_,"@_"),1,6
      Hmmmm. Might be time for another release.

      Could you email me privately, and I'll send you an alpha that you can try out before I upload it to CPAN?

        I went ahead and uploaded Perligata v0.6 to CPAN.
        I'm reasonably confident it will solve your problem.
        Please let me know if it doesn't.

        Damian

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1167031]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (7)
As of 2024-04-19 10:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found