#!/usr/bin/perl -w use strict; use PDL::Core; use PDL::Index; use PDL::Basic; use PDL::Math; use PDL::Primitive; use PDL::Slices qw/!index/; # <-HERE is the problem (and the solution) use PDL::IO::FITS; my $test = "This is a test and I hope it works."; my $pos4 = index $test,"test"; print "pos4 = $pos4\n"; exit(0); __END__ pos4 = 10 #### the perl function index a PDL function index in the module PDL::Slices (the real culprit) and a module named PDL::Index