in reply to Comments trouble

I don't have any experience with Mac perl, but is it possible that your script has carriage returns between lines and the # comment is only ending at line feeds?

Replies are listed 'Best First'.
Re: Re: Comments trouble
by Cody Pendant (Prior) on Dec 29, 2003 at 00:34 UTC
    Just to note, this isn't MacPerl any more, it's just ... Perl running on MacOSX. OSX is UNIX-like.

    And I don't think the original poster was asking about Perl programs written in the command line, only about programs run from the command line.

    It might be a line-ending problem of another kind, but I second the "please provide examples" post above.



    ($_='kkvvttuubbooppuuiiffssqqffssmmiibbddllffss') =~y~b-v~a-z~s; print
      Just to note, this isn't MacPerl any more, it's just ... Perl running on MacOSX. OSX is UNIX-like.
      That's what I thought, but wasn't sure; hence the Mac perl, not MacPerl. Are there editors that have \x0D as newline convention while the OSX perl is expecting \x0A? Or vice versa?
      And I don't think the original poster was asking about Perl programs written in the command line, only about programs run from the command line.

      It might be a line-ending problem of another kind, but I second the "please provide examples" post above.

      If it is a line-ending problem, pasting an example will probably hide the evidence. Maybe stick something like
      BEGIN { use Data::Dumper; $Data::Dumper::Useqq=1; open FOO, $0 or die +"nope: $!" ; print Dumper $_ while <FOO>; exit }
      at the beginning of the source and run it and show the output. I don't remember if the Data::Dumper in 5.6.0 had the Useqq option, though.