astroman has asked for the wisdom of the Perl Monks concerning the following question:

Hello Perl Monks! Is there a way to silence the output of rfits calls in PDL? Every time I read an image, I get to see
Reading IMAGE data... BITPIX = -64 size = 1024 pixels Reading 8192 bytes FITS file may contain bad values. BSCALE = && BZERO =
which becomes rather tedious after a while. As far as I can tell, rfits should only display this if $PDL::Verbose == 1... I've tried manually setting this to 0 by  $PDL::Verbose = 0; but to no avail. Please help ease my frustration!

Replies are listed 'Best First'.
Re: Suppress output of rfits
by Anonymous Monk on Nov 08, 2011 at 03:41 UTC

    AFAICT, that should work, which version do you have?

    PDL::verbose

    sub _rfits_image($$$$) { print "Reading IMAGE data...\n" if($PDL::verbose);
      You solved it: I had been using a capital V for "verbose" because it appeared that way on the reference I'd found. Setting $PDL::verbose = 0; works great! Thanks!