Weird PERL script behaviour [on hold]bad interpreter: Text file busyHow do I make Apache finish running Perl...

Why do members of Congress in committee hearings ask witnesses the same question multiple times?

Wanted: 5.25 floppy to usb adapter

How would an AI self awareness kill switch work?

I am on the US no-fly list. What can I do in order to be allowed on flights which go through US airspace?

Crystal compensation for temp and voltage

Table enclosed in curly brackets

Eww, those bytes are gross

How can I improve my fireworks photography?

Why zero tolerance on nudity in space?

How do we edit a novel that's written by several people?

Am I using the wrong word all along?

Can I retract my name from an already published manuscript?

How to push a box with physics engine by another object?

How to acknowledge an embarrassing job interview, now that I work directly with the interviewer?

Why is this code uniquely decodable?

If all harmonics are generated by plucking, how does a guitar string produce a pure frequency sound?

Is 45 min enough time to catch my next flight in Copenhagen?

Does Windows 10's telemetry include sending *.doc files if Word crashed?

F1 visa even for a three-week course?

What is Crew Dragon approaching in this picture?

Why didn't Eru and/or the Valar intervene when Sauron corrupted Númenor?

What's the rationale behind the objections to these measures against human trafficking?

On what did Lego base the appearance of the new Hogwarts minifigs?

Word to be used for "standing with your toes pointing out"



Weird PERL script behaviour [on hold]


bad interpreter: Text file busyHow do I make Apache finish running Perl scripts after the web browser is closed?How to run linux bash script from web browser?Using “at” to call a delayed process from within a cgi scriptRun Perl Script on Apache2/Redhat5.5Installing BugZilla on Snow Leopard Server: Perl install issuesperl app on apache and cgi behaves terribly with 504 gateway timeoutsPerl doesn't work without warnings in CGICGI errors (Can't open perl script / Permission denied)Piping exim email to Perl script













-2















Normally, I turn on Apache on WIndows, and place my scripts in the CGI-BIN, and call them from the browser ... as per a normal web based arrangement.



But I'm working on an idea that doesn't need a browser to show output, so I thought I'd see if PERL can run on its own, ie from Windows Command Line. This is where it gets interesting !



I have this little script:



#!/usr/bin/perl

open(TEST, ">","DUMMY.txt" or die 'could not open file');
print TEST "Will this write?";
close(TEST);

print "script has run";

1;


Now "DUMMY.txt" does not exist, so it SHOULD print the "or die" statement. It doesn't. If a file DOES exist, it should print to that file. It doesn't. All I get each time is "script has run", (so at least I know it's being executed)



Oh, I also thought it might be because the CGI-BIN was reserved, so I tried the full path to the public_html folder above CGI-BIN. That didn't work either!



Perl version shows as V5.20.1



My goal is to start script (via commannd line) then have it running as a background on Windows until it encounters a key press to exit, monitoring a folder. and then sending any PDF dropped into that folder silently to printer via GhostScript. (I also have to send a single line of data from a HTML/Javascript form - one way only - so program will not return any data to browser) But I need to find why I can't even save a text file at present !



NB: When did the arrow become an individual entity? I used to write (TEST, ">dummy.txt");










share|improve this question













put on hold as off-topic by Michael Hampton 10 hours ago



  • This question does not appear to be about server, networking, or related infrastructure administration within the scope defined in the help center.

If this question can be reworded to fit the rules in the help center, please edit the question.

















  • I have just tried it with 'strict' and 'warnings' and it reports "useless use of a constant ("TEST") in void context ... useless use of a constant (">" in void context" ... Can't use string "TESTME.txt" as a symbol ref whilst using strict ..." WHAT ???

    – Cristofayre
    13 hours ago











  • Got rid of the above by moving the close bracket to before the "or die" statement so open command only has 3 values ... but still don't work !

    – Cristofayre
    12 hours ago











  • Checked the time stamp of the file it's supposed to be writing out too: Still the same as when I started 2hrs ago ... so confirms it is not even opening file, despite the script saying it's run.

    – Cristofayre
    12 hours ago











  • Programming questions need to be asked on Stack Overflow.

    – Michael Hampton
    10 hours ago
















-2















Normally, I turn on Apache on WIndows, and place my scripts in the CGI-BIN, and call them from the browser ... as per a normal web based arrangement.



But I'm working on an idea that doesn't need a browser to show output, so I thought I'd see if PERL can run on its own, ie from Windows Command Line. This is where it gets interesting !



I have this little script:



#!/usr/bin/perl

open(TEST, ">","DUMMY.txt" or die 'could not open file');
print TEST "Will this write?";
close(TEST);

print "script has run";

1;


Now "DUMMY.txt" does not exist, so it SHOULD print the "or die" statement. It doesn't. If a file DOES exist, it should print to that file. It doesn't. All I get each time is "script has run", (so at least I know it's being executed)



Oh, I also thought it might be because the CGI-BIN was reserved, so I tried the full path to the public_html folder above CGI-BIN. That didn't work either!



Perl version shows as V5.20.1



My goal is to start script (via commannd line) then have it running as a background on Windows until it encounters a key press to exit, monitoring a folder. and then sending any PDF dropped into that folder silently to printer via GhostScript. (I also have to send a single line of data from a HTML/Javascript form - one way only - so program will not return any data to browser) But I need to find why I can't even save a text file at present !



NB: When did the arrow become an individual entity? I used to write (TEST, ">dummy.txt");










share|improve this question













put on hold as off-topic by Michael Hampton 10 hours ago



  • This question does not appear to be about server, networking, or related infrastructure administration within the scope defined in the help center.

If this question can be reworded to fit the rules in the help center, please edit the question.

















  • I have just tried it with 'strict' and 'warnings' and it reports "useless use of a constant ("TEST") in void context ... useless use of a constant (">" in void context" ... Can't use string "TESTME.txt" as a symbol ref whilst using strict ..." WHAT ???

    – Cristofayre
    13 hours ago











  • Got rid of the above by moving the close bracket to before the "or die" statement so open command only has 3 values ... but still don't work !

    – Cristofayre
    12 hours ago











  • Checked the time stamp of the file it's supposed to be writing out too: Still the same as when I started 2hrs ago ... so confirms it is not even opening file, despite the script saying it's run.

    – Cristofayre
    12 hours ago











  • Programming questions need to be asked on Stack Overflow.

    – Michael Hampton
    10 hours ago














-2












-2








-2








Normally, I turn on Apache on WIndows, and place my scripts in the CGI-BIN, and call them from the browser ... as per a normal web based arrangement.



But I'm working on an idea that doesn't need a browser to show output, so I thought I'd see if PERL can run on its own, ie from Windows Command Line. This is where it gets interesting !



I have this little script:



#!/usr/bin/perl

open(TEST, ">","DUMMY.txt" or die 'could not open file');
print TEST "Will this write?";
close(TEST);

print "script has run";

1;


Now "DUMMY.txt" does not exist, so it SHOULD print the "or die" statement. It doesn't. If a file DOES exist, it should print to that file. It doesn't. All I get each time is "script has run", (so at least I know it's being executed)



Oh, I also thought it might be because the CGI-BIN was reserved, so I tried the full path to the public_html folder above CGI-BIN. That didn't work either!



Perl version shows as V5.20.1



My goal is to start script (via commannd line) then have it running as a background on Windows until it encounters a key press to exit, monitoring a folder. and then sending any PDF dropped into that folder silently to printer via GhostScript. (I also have to send a single line of data from a HTML/Javascript form - one way only - so program will not return any data to browser) But I need to find why I can't even save a text file at present !



NB: When did the arrow become an individual entity? I used to write (TEST, ">dummy.txt");










share|improve this question














Normally, I turn on Apache on WIndows, and place my scripts in the CGI-BIN, and call them from the browser ... as per a normal web based arrangement.



But I'm working on an idea that doesn't need a browser to show output, so I thought I'd see if PERL can run on its own, ie from Windows Command Line. This is where it gets interesting !



I have this little script:



#!/usr/bin/perl

open(TEST, ">","DUMMY.txt" or die 'could not open file');
print TEST "Will this write?";
close(TEST);

print "script has run";

1;


Now "DUMMY.txt" does not exist, so it SHOULD print the "or die" statement. It doesn't. If a file DOES exist, it should print to that file. It doesn't. All I get each time is "script has run", (so at least I know it's being executed)



Oh, I also thought it might be because the CGI-BIN was reserved, so I tried the full path to the public_html folder above CGI-BIN. That didn't work either!



Perl version shows as V5.20.1



My goal is to start script (via commannd line) then have it running as a background on Windows until it encounters a key press to exit, monitoring a folder. and then sending any PDF dropped into that folder silently to printer via GhostScript. (I also have to send a single line of data from a HTML/Javascript form - one way only - so program will not return any data to browser) But I need to find why I can't even save a text file at present !



NB: When did the arrow become an individual entity? I used to write (TEST, ">dummy.txt");







perl






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked 13 hours ago









CristofayreCristofayre

12




12




put on hold as off-topic by Michael Hampton 10 hours ago



  • This question does not appear to be about server, networking, or related infrastructure administration within the scope defined in the help center.

If this question can be reworded to fit the rules in the help center, please edit the question.







put on hold as off-topic by Michael Hampton 10 hours ago



  • This question does not appear to be about server, networking, or related infrastructure administration within the scope defined in the help center.

If this question can be reworded to fit the rules in the help center, please edit the question.













  • I have just tried it with 'strict' and 'warnings' and it reports "useless use of a constant ("TEST") in void context ... useless use of a constant (">" in void context" ... Can't use string "TESTME.txt" as a symbol ref whilst using strict ..." WHAT ???

    – Cristofayre
    13 hours ago











  • Got rid of the above by moving the close bracket to before the "or die" statement so open command only has 3 values ... but still don't work !

    – Cristofayre
    12 hours ago











  • Checked the time stamp of the file it's supposed to be writing out too: Still the same as when I started 2hrs ago ... so confirms it is not even opening file, despite the script saying it's run.

    – Cristofayre
    12 hours ago











  • Programming questions need to be asked on Stack Overflow.

    – Michael Hampton
    10 hours ago



















  • I have just tried it with 'strict' and 'warnings' and it reports "useless use of a constant ("TEST") in void context ... useless use of a constant (">" in void context" ... Can't use string "TESTME.txt" as a symbol ref whilst using strict ..." WHAT ???

    – Cristofayre
    13 hours ago











  • Got rid of the above by moving the close bracket to before the "or die" statement so open command only has 3 values ... but still don't work !

    – Cristofayre
    12 hours ago











  • Checked the time stamp of the file it's supposed to be writing out too: Still the same as when I started 2hrs ago ... so confirms it is not even opening file, despite the script saying it's run.

    – Cristofayre
    12 hours ago











  • Programming questions need to be asked on Stack Overflow.

    – Michael Hampton
    10 hours ago

















I have just tried it with 'strict' and 'warnings' and it reports "useless use of a constant ("TEST") in void context ... useless use of a constant (">" in void context" ... Can't use string "TESTME.txt" as a symbol ref whilst using strict ..." WHAT ???

– Cristofayre
13 hours ago





I have just tried it with 'strict' and 'warnings' and it reports "useless use of a constant ("TEST") in void context ... useless use of a constant (">" in void context" ... Can't use string "TESTME.txt" as a symbol ref whilst using strict ..." WHAT ???

– Cristofayre
13 hours ago













Got rid of the above by moving the close bracket to before the "or die" statement so open command only has 3 values ... but still don't work !

– Cristofayre
12 hours ago





Got rid of the above by moving the close bracket to before the "or die" statement so open command only has 3 values ... but still don't work !

– Cristofayre
12 hours ago













Checked the time stamp of the file it's supposed to be writing out too: Still the same as when I started 2hrs ago ... so confirms it is not even opening file, despite the script saying it's run.

– Cristofayre
12 hours ago





Checked the time stamp of the file it's supposed to be writing out too: Still the same as when I started 2hrs ago ... so confirms it is not even opening file, despite the script saying it's run.

– Cristofayre
12 hours ago













Programming questions need to be asked on Stack Overflow.

– Michael Hampton
10 hours ago





Programming questions need to be asked on Stack Overflow.

– Michael Hampton
10 hours ago










0






active

oldest

votes

















0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes

Popular posts from this blog

117736 Шеррод Примітки | Див. також | Посилання | Навігаційне...

As a Security Precaution, the user account has been locked The Next CEO of Stack OverflowMS...

Маріан Котлеба Зміст Життєпис | Політичні погляди |...