Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re^2: Using IF and OR, I'm sure there is a better way

by swampyankee (Parson)
on Dec 15, 2005 at 22:24 UTC ( [id://517095] : note . print w/replies, xml ) Need Help??


in reply to Re: Using IF and OR, I'm sure there is a better way
in thread Using IF and OR, I'm sure there is a better way

Hey, it looks like the Perl6 people have been reading up on Fortran 90...(although it's quite possible any was adapted to Fortran90 from some other language).

Fortran 90's any statement returns true of false if any element in an array meets a test condition, e.g.,

integer,dimension(6) :: ar ar = (/1,3,4,5,6,7/) if(any(ar > 4) then # returns true if any element of ar is greater tha +n 4 call a_miracle_happens_here endif

I'm still wondering why everybody was using regex for the test; it looks like a numerical comparison to me.