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

Re: [MacPerl] Embedded Control Chars (fwd)



According to Chuck Rice:
> 
> Wait a minute! I am new to Perl, but the way I understand things,

Yepper - but that is not what was originally posted and
responded to.  Chris' program dealt with \012 and he
pointed out that there could be problems due to control
characters being in a program in other ways.  Someone said
why would anyone ever put control characters in a program.
I'm just saying - here's why they might be there.  Anything
else read into the message is outside of the scope of the
original message and response.  Further, the responses of
"but you could use module X to do the same thing" really
are not a good response.  Sure, there are modules out there
to help everyone out.  But how many times have we seen
messages where someone is grinding away doing things from
the ground up?  So the response to the

	s/\012/\012\015/g;

which was: "But CGI.pm would allow you to not have to do
that" really is meaningless in the context of answering
"why would anyone ever put control characters into their
programs?"  Because even though YOU might use CGI.pm - not
everyone does.  So the above is something those people who
do not use CGI.pm need to watch out for.  Because for them,
Chris' program provides a gotcha.  This is not to say that
the program Chris posted is bad/unusable/not good/or
anything else you may want to think I'm saying.  Chris'
program is great for what it does.  He is the one who noted
that everyone should be careful when dealing with control
characters.  And yes, "\001" is a set of characters and not
an actual control character.  But I really didn't think
control-A would go across e-mail very well so I used the
"\001" instead of a control-A itself.  But either way -
you'd have to check the original program to see which needs
to be watched for.  :-)

***** Want to unsubscribe from this list?
***** Send mail with body "unsubscribe" to mac-perl-request@iis.ee.ethz.ch