So... the second time it ran obviously.

Maybe it also ran the first time, but the program is written in such a way to not print stuff to stdout

You can try http://live.sysinternals.com/procexp.exe to see if the program really ran

Or even try using depends.exe like this   depends.exe /c /f:1 /pb /ot:temp.txt ...perl.exe foo.pl ... to see if the program really ran the first time

It is a very weird problem I know. Even the teacher couldn't figure it out.

Doesn't sound too weird , just sounds like both you and the teacher are tired/confused/new

Maybe your perl-installation is crippled. Long ago I downloaded a portable strawberryperl on WindowsVista(?) and windows wouldn't let me unzip it because of some malware protection feature ... or some UAC ...

so maybe your user account isn't getting a UAC prompt on first run, but its running with lower privileges on the second run

or maybe you got some kind of anti-malware/anti-spyware/or something that is interfering (unlikely but you can never tell)

You must be a Mac user?

I'm on windows. The things that show up in folders are called icons/files, they're not called windows ... now if you had said file-window it might be more obvious what you're talking about

remember I'm not peeking over your shoulder at your monitor, so "the window" doesn't tell me what it is


In reply to Re^5: Newbie cmd prompt problem by Anonymous Monk
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.