[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl] 2 Simple Questions



>On Fri, Apr 30, 1999 at 02:33:23PM -0500, Jonathan W. Daniel wrote:
>} I'm a little new to MacPerl.
>}
>} If I port scripts over from Unix, don't I have to change "/" marks in file
>} paths, to ":" ? This didn't seem to work for me?
>
>Why do you expect it to just work like that?  Do the files exist in
>the same location on you Mac as they do on Unix?  For example, you
>can't expect /etc/passwd and :etc:passwd to be the same, can you?
>Show us some examples of what you're trying to do.

Yes, the path is the problem. The script works fine... until I indicate a
path for the file I want to write to. So yes, it's just a path issue.

exapmle:

$myFile = "myFile.txt";
open(ADDFILE, ">> $myFile");
print ADDFILE "$temp";
close(ADDFILE);

works

but

$myFile = "folder1:myFile.txt";
open(ADDFILE, ">> $myFile");
print ADDFILE "$temp";
close(ADDFILE);

does not.

And yes, folder1 is where it should be.

And yes, I would like to know what the equivalent to "../" is in MacPerl if
you don't mind.

>}
>} Also, could someone tell me a quick way to get the current date without
>} using additional modules?
>
>You mean "scalar localtime", or do you want something fancier?

Yep, that would be cool. I don't need anything fancy.

thanks,
Jonathan

===== Want to unsubscribe from this list?
===== Send mail with body "unsubscribe" to macperl-request@macperl.org