At 18.05 6/27/97, Mark Manning/Muniz Eng. wrote: >According to Chris Nandor: >> >> >$x = &StandardFile'GetNewFile("Select New File", "foo"); >> >open (MYFILE,">$x")|| die "could not open $x"; >> >> >MacPerl::SetFileInfo ("R*ch" , "TEXT" , MYFILE); >> ^^^^^^ >> I think the third arg should be a path to a file (i.e., $x), not a >>filehandle. > >Don't you also have to close the file first? The file >isn't even officially created until after it's been >closed. So wouldn't SetFileInfo always bomb or at least >have problems if the file hasn't really been created yet? No, the file is created after it is opened. #!perl open(N,">PowerPudgeII:Desktop Folder:new"); sleep(10000000); __END__ That file is created while U wait. Then go back and command-. the script. :-) Actually, I like the idea of changing the file type ASAP after opening for write access. That way the Finder doesn't have time to get confused about what the file type is, if the file is on the desktop or in an open Finder window. -- Chris Nandor pudge@pobox.com http://pudge.net/ %PGPKey=('B76E72AD',[1024,'08 24 09 0B CE 73 CA 10 1F F7 7F 13 81 80 B6 B6']) ***** Want to unsubscribe from this list? ***** Send mail with body "unsubscribe" to mac-perl-request@iis.ee.ethz.ch