Hi there. This is infuriating me and I can't comprehend why it's happening. Best guess is that I've mangled the perl folder somehow. But re-installing the OS (Ubuntu Linux) doesn't help. Have I disabled something? Can I debug somehow? How can I find out why this is suddenly not working? Any assistance deeply appreciated!

File: 'test.pl'

print "Hello world!\n"; do 'test-response.pl'; print "Did that work?";
File: 'test-response.pl' (same directory as 'test.pl')
print "Hello Andy!\n";
Output:
Hello world! Did that work?

Couldn't be simpler, surely? Done this a million times and never had a problem (unless my code has errors, which is not the problem here).

Thanks in advance!

Andy


In reply to 'do' command is dead? Surely not? by ACI

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.