I not only write code in Perl but in C, C++ and JavaScript and can so fully relate. Not as bad is when I write stuff in assembler. At least when I'm coding in assembler I go into "assembler mode" and don't mix so badly.

Actually, back in the day when I was coding in both Z80 and MC6800x0 assembler I used to mix syntaxes. This normally occured during one of those all-night sessions we all know and love. When sleep deprivation takes over and caffiene just doesn't cut it any more.

Many is the time when I am writing C code I have wanted to do string operations like:

buffer1 .= buffer2;
or
buffer =~ s/\s+$//;
or some other Perlism. Or this in Perl code:
for(ix=0;ix<=5;ix++) { : :
Where are the dollar signs?

Can you spot the C code syntax errors here:

for(ix=0;ix<=$#buffer;ix++){ $buffer[$ix]='\0'; }
Just did that one last week at about 1AM.


In reply to Re: hangover from perl... by blue_cowdawg
in thread hangover from perl... by kiat

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.