Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: write to local files? and why does strict bugger this online but not locally?

by ncw (Friar)
on Sep 13, 2001 at 00:09 UTC ( #112006=note: print w/replies, xml ) Need Help??


in reply to write to local files? and why does strict bugger this online but not locally?

Firstly, yes it is possible to write to a local file. I tried your program and it worked creating menu.txt.

If the file didn't get created then it is probably being created somewhere else. Put a

use Cwd; print cwd();
Into your program to see where it thinks the current directory is, then look there for menu.txt

Secondly - check the version of perl between your local machine and the remote machine.

perl -V
Will tell you, or if you don't have shell access just run that from a system command.

If it is < perl 5.6 then use diagnostics won't work which is a possibly explanation.

Replies are listed 'Best First'.
Re: Re: write to local files? and why does strict bugger this online but not locally?
by VSarkiss (Monsignor) on Sep 13, 2001 at 01:35 UTC

    If it is < perl 5.6 then use diagnostics won't work which is a possibly explanation.
    ? The diagnostics module has been around since 1995, and only requires 5.001. The warnings module is the one that needs 5.6. Which, of course, doesn't explain why removing use diagnostics fixed the problem for jerrygarciuh. Unless s/he actually removed the use warnings line....

Re: Re: write to local files? and why does strict bugger this online but not locally?
by jerrygarciuh (Curate) on Sep 13, 2001 at 00:30 UTC
    Yikes!! It sure was being created in the local tests, in C:\Windows!!! It would have overwritten another file had I been using an unwise name... Correct? How do you tell a script to ask before overwriting? Thx for both answers, you were correct on both counts, server is v5.0 and removing diagnostics corrected problem!!
    jg

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://112006]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (5)
As of 2022-01-21 16:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In 2022, my preferred method to securely store passwords is:












    Results (59 votes). Check out past polls.

    Notices?