Edward (Post Doc) Hyer wrote:
> With regular Perl subroutines, doing simple things, my habit had been
> for them to simply
> return;
> if something went wrong. This meant I could simply check whether the
> output was defined to determine of the routine had done its job, as is
> standard Perl SOP.
> 
> With routines that are supposed to return PDLs, this is trickier.

Most PDL routines return piddles to allow for operation chaining.

> Basically, I'm having trouble finding a routine that I can use to sort
> PDLs and other output. If I test the output, it barfs "multielement
> piddle in conditional expression" if it gets a PDL. If I used nelem(),
> well, nelem(undef) == 1.
>
> TMTOWTDY, but the other ways are definitely uphill from a simple ispdl()
> function that can test for PDLness. I can't believe there's no such
> function-- there must be!

perldoc -f ref

> Help me out,
> 
> --EJH.

_______________________________________________
Perldl mailing list
[email protected]
http://mailman.jach.hawaii.edu/mailman/listinfo/perldl

Reply via email to