Hello,

Purpose:
I am trying to understand the reason for the following error.

Error:
"Bareword "NetCDF::READ" not allowed while "strict subs" in use..."

Actions already taken:
1. Searched Google --> Perl Bareword not allowed while "strict subs"
Most of the hits I have looked at deal with just an OPEN Perl command in a subroutine. I am trying to understand why the module call NetCDF::READ results in similar behavior. Not understanding the parallel between the OPEN explanations and how to apply it to NetCDF::READ.

2. Searched http://perl.markmail.org
Definitely found some relevant strict/module questions but all I see are corrections to the code not an explanation of what Perl is actually finding a problem with and, more importantly, why.

Request:
Rather than re-invent the wheel could someone please point me to an existing detailed explanation what Perl is "thinking/seeing" in my code? I'm sure it exists but I haven't done a good job of finding it yet.
OR
Waste some of your valuable time and explain what is going on. ;)

Thanks,

Phil


Reduced code START:
########################################################################
#!/usr/local/bin/perl

# Programming conventions
use strict;
use warnings;

# Modules
use NetCDF;

# Local require files
require "/usr/local/wx/include_files/date-lib.pl";

# Setting directories
my $ownerDir   = "/home/disk/dagny/regulski";
my $mainDir    = "${ownerDir}/radar_nowcast";
my $netcdfDir  = "${mainDir}/data/netcdf_files";

# Determine if there is anything to forecast
my $doNowcast = &checkDoNowcast();

##########################################################################
# SUBROUTINES
##########################################################################
sub checkDoNowcast # Determines if there is any reflectivity to forecast
                 # If not, sets doNowcast = 0

{
my $ncid = NetCDF::open("${netcdfDir}/REORDER.KATX_20091104_1651.CEDRIC.Z1.BIN.nc",NetCDF::READ);

      # Determine if there are values inside the file that correspond
      # to weather to nowcast.


  NetCDF::close($ncid);
}

########################################################################
:Code END

--
======================================================
Phil Regulski
Research Meteorologist
Mesoscale Analysis and Forecasting Group
Department of Atmospheric Sciences
University of Washington, Box 351640
(Sunny) Seattle, WA 98195

Office:    612 ATG
Phone:     206 221 6359
Fax:       206 685 9302
E-mail:    regul...@atmos.washington.edu
Webpage:   http://www.atmos.washington.edu/~regulski/
======================================================


--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to