Choroba, thanks for your reply. I implemented your suggestions and will add the code here for trouble shooting purposes, but I am still getting this error:
Undefined subroutine &VSCOperl::trim called at ./dupCheck.pl line 19, <DATA> line 960.

Here is the new code to my program:

#!/home/myhomedrive/opt/perl/bin/perl use strict; use warnings; use Data::Dumper; use Net::LDAP; use lib '/home/myhomedrive/scripts/lib'; use customPerlMod qw{ trim ltrim rtrim }; my $string = " ll "; $string = customPerlMod::trim ( $string );

and here is the Module:

#!/home/myhomedrive/opt/perl/bin/perl package customPerlMod; use strict; use warnings; use Exporter 'import'; our @EXPORT_OK = qw(return_month return_day trim ltrim rtrim ); # Perl trim function to remove whitespace from the start and end of th +e string sub trim($) { my $string = shift; $string =~ s/^\s+//; $string =~ s/\s+$//; return $string; } # Left trim function to remove leading whitespace sub ltrim($) { my $string = shift; $string =~ s/^\s+//; return $string; } # Right trim function to remove trailing whitespace sub rtrim($) { my $string = shift; $string =~ s/\s+$//; return $string; } 1;

what do you mean by prototypes?

Thanks in advance for your help! Frank


In reply to Re^2: Trouble usig a subroutine from a custom module by fritz1968
in thread Trouble usig a subroutine from a custom module by fritz1968

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.