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

[MacPerl] An idea on linefeeds that didn't work.



&rant;
print "\:o\(\n";
sub rant
  {

This from MPW perl:

   ### begin copy
perl Ganymede:Nobby:combine.pl Ganymede:Nobby:groups.txt
# Illegal character \012 (carriage return).
File 'Ganymede:Nobby:combine.pl'; Line 2
# (Maybe you didn't strip carriage returns after a network transfer?)
   ### end copy

So I really thought I had a solution.

I'll just keep the linefeeds in my source code and make up a simple MPW menu
item to install them each time I save the file. That way my scripts will
transfer anywhere.

Surely the <0A> character is whitespace which will be ignored by the MacPerl
parser. Either the <0A> or the <0D> will terminate the lines.
.......

Nope.. Screwed again, but this time by MacPerl and not by perl in general.

Now my ASCII crib sheet says \012 (octal) = 0A (hex) = 10 (dec) =
"linefeed". What's this "carriage return" stuff? Is this a hard-coded error
message which assumes perl is running on a UNIX box in English?

If the parser takes the time and core to remind me that I didn't strip off
the junk then just why can't it just ignore it? Note that the -w switch was
OFF.

I know I can build MacPerl myself and I should be more tolerant. I really do
appreciate all the work that has been done by you volunteers. Perhaps next
week...

  }

--> From the USA, the only socialist country that refuses to admit it.<--


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