Here is the relevant piece of code causing the complaint (M09_marker_mismatch()) from Inline

sub read_DATA { require Socket; my ($marker, $marker_tag); my $o = shift; my ($pkg, $language_id) = @{$o->{API}}{qw(pkg language_id)}; unless ($DATA_read{$pkg}++) { no strict 'refs'; *Inline::DATA = *{$pkg . '::DATA'}; local ($/); my ($CR, $LF) = (&Socket::CR, &Socket::LF); (my $data = <Inline::DATA>) =~ s/$CR?$LF/\n/g; @{$DATA{$pkg}} = split /(?m)^[ \t]{0,}(__\S+?__\n)/, $data; shift @{$DATA{$pkg}} unless ($ {$DATA{$pkg}}[0] || '') =~ /__\ +S+?__\n/; } ($marker, $o->{API}{code}) = splice @{$DATA{$pkg}}, 0, 2; croak M08_no_DATA_source_code($language_id) unless defined $marker; ($marker_tag = $marker) =~ s/__(\S+?)__\n/$1/; croak M09_marker_mismatch($marker, $language_id) unless $marker_tag eq $language_id; }

first line below asks the system what is CR and what is LF and then replaces code-line endings with a \n and then splits the code to lines. If you are willing to add debugging lines in Inline.pm in the section with the above sub, or start by making sure your system's CR and LF are some valid characters.

my ($CR, $LF) = (&Socket::CR, &Socket::LF); (my $data = <Inline::DATA>) =~ s/$CR?$LF/\n/g; @{$DATA{$pkg}} = split /(?m)^[ \t]{0,}(__\S+?__\n)/, $data;

I would follow Corion's hint on CR/LF - what editor did you use to type in your perl script? what system are you on?


In reply to Re: using Inline Python with CGI by bliako
in thread using Inline Python with CGI by garima3003

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.