At 07:19 -0700 9/15/03, Chris Nandor wrote, and I snipped:
>  $ cat > Icon^M
>  foo
>  ^C
>  $ perl -e 'open $fh, "Icon\r" or die $!; print scalar <$fh>'
>  No such file or directory at -e line 1.
>  # add null
>  $ perl -e 'open $fh, "Icon\r\0" or die $!; print scalar <$fh>'
>  foo

The cat operation creates a text file with "foo" in the data, and only, fork.

Rich's problem is "opening" Icon\r files which are surely from Classic icon resource 
files zB (using MPW on a 9.1 box):

directory Ganymede:
files -x br 'Icon'�n''  ### "OPTION-d n" is a return character in classic.
Name        Data Sz   Rsrc Sz
'Icon'�n''       0b         1982b

If 'Icon'�n'' is opened in perl in OS neXt, will perl read from the resource fork if 
there is no data fork? Or will it fail to open?  What about a write-enabled open? Will 
it write to the end of the resource fork or will it create a data fork?

  $ perl -e 'open $fh, ">>Icon\r\0" or die'

--

Applescript syntax is like English spelling:
Roughly, but not thoroughly, thought through.

Reply via email to