"I think I know what the problem is. Apparently when naming your files you should not use spaces. When I changed the file name and removed my spaces it ran."

I generally refrain from using spaces in filenames because spaces are already used to separate the program name from switches, input files, and so on: basically it's a real nuisance that's easily avoided. However, it's not actually illegal and you will encounter third-party filenames that do include spaces: when you do, just quote them (i.e. "some filename with spaces"). I'd tend to write that filename as some_filename_without_spaces, which is just as easy to read but has none of the associated problems.

"Now I know for sure I'll never be a programmer because I have LOTS of errors:-)"

You'll learn a lot more from making mistakes and fixing them, than if you wrote all your code perfectly. What's more, sorry to be the one to tell you this but, don't worry at all about mistakes after only 2 days of coding: you'll still be making mistakes with 20 years experience under your belt.

Also, don't worry too much about the number of errors: a simple mistake like a missing semicolon at the end of a statement, or using the wrong quote to terminate a string, can result in dozens of errors. When I frst ran the code you posted, I got:

syntax error at -e line 9, near ");" Unmatched right curly bracket at -e line 12, at end of line syntax error at -e line 12, near "}" syntax error at -e line 16, near "}" Execution of -e aborted due to compilation errors.

But, as you can see from my previous post, there were only two small errors that were easily fixed.

-- Ken


In reply to Re^3: Newbie cmd prompt problem by kcott
in thread Newbie cmd prompt problem by nquiton

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.