Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling

Re^3: Perl module error

by toolic (Bishop)
on Oct 04, 2013 at 15:17 UTC ( #1056894=note: print w/ replies, xml ) Need Help??

in reply to Re^2: Perl module error
in thread Perl module error

Maybe there is some problematic whitespace in your .pm file:

cat -A

You should download the code from your post, just like I did, and paste it into a new file.

Comment on Re^3: Perl module error
Download Code
Replies are listed 'Best First'.
Re^4: Perl module error
by Vaclav_ (Novice) on Oct 04, 2013 at 22:56 UTC
    I did what you said, downloaded it and replaced, and it worked! But then when I add my additional code to the file, I get error again: "" did not return a true value". So what is this whitespace problem? White spaces should be ignored by perl, and I don't have new line after 1; Is it about the newline character? I'm using Notepad++ on windows.

      So what is this whitespace problem?

      do like toolic told you and find out using cat -A file

      $ cat -A foo sub ^Mfoo ^M{ 1 ^M}^M
      ^M is \r aka CR

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1056894]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (3)
As of 2016-02-12 01:53 GMT
Find Nodes?
    Voting Booth?

    How many photographs, souvenirs, artworks, trophies or other decorative objects are displayed in your home?

    Results (386 votes), past polls