http://www.perlmonks.org?node_id=1056984


in reply to Simple perl Code runs on Ubuntu but gives errors on Cygwin

The (maybe not so) obvious error is that you are missing a semi-colon (";") after this line in the code:

print "Array Sample \n"

I don't see how it would have run on Ubuntu without it, so I can only surmise that you typed in by hand instead of doing a copy/paste on your Cygwin box and left it out by mistake.

On time, cheap, compliant with final specs. Pick two.

Replies are listed 'Best First'.
Re^2: Simple perl Code runs on Ubuntu but gives errors on Cygwin
by Krishna05 (Initiate) on Oct 05, 2013 at 02:43 UTC

    Hi! Thank you both for the reply! You were right. I didn't check a semi-colon was missing there. Was so dumb! Lesson learned.

      You're welcome! Rule of thumb, if you see a string of error messages that you just know don't make any sense, check the line before the first one listed to see if you left out a semi-colon. We all make this mistake, even after as many years as I have in this game. :)

      On time, cheap, compliant with final specs. Pick two.