Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: Lagrange Polynomials in Perl

by AnomalousMonk (Archbishop)
on Apr 28, 2015 at 21:23 UTC ( [id://1125068]=note: print w/replies, xml ) Need Help??


in reply to Lagrange Polynomials in Perl

And, of course, the obligatory NB about C-style for- or foreach-loops versus Perl-style: IMHO, the loops in the OPed code are better as:

my $arrayref = ...; for my $i (0 .. $#$arrayref) { for my $j (0 .. $#$arrayref) { do_something_with($i, $j); } }


Give a man a fish:  <%-(-(-(-<

Replies are listed 'Best First'.
Re^2: Lagrange Polynomials in Perl
by Mascasc (Novice) on Apr 29, 2015 at 14:29 UTC
    I actually didn't realize that this was an option. I've only seen the C-style before, but this has a certain Fortran flair, I appreciate that.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (5)
As of 2024-04-24 09:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found