Find the answer to your Linux question:
Results 1 to 4 of 4
im try to make a perl script but when i save it, its save as hello.pl.sxw i know im running perl cause i did a perl -v in the command ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Linux Newbie
    Join Date
    Oct 2005
    Posts
    110

    perl script


    im try to make a perl script but when i save it, its save as hello.pl.sxw i know im running perl cause i did a perl -v in the command line. can some one tell me what im going wrong

  2. #2
    Linux Newbie
    Join Date
    Oct 2005
    Posts
    110

    perl

    ok well i did a perl script this is what i use in the first line
    #!/usr/bin/perl
    and got an error
    this is the error
    Unrecognized character \x03 at test1.pl line 1.
    can some one the me whats going on, on line 1.

  3. #3
    Linux Enthusiast scientica's Avatar
    Join Date
    Sep 2003
    Location
    South- or "Mid-" Sweden
    Posts
    742
    You really shouldn't use OpenOffice.org to write source code, OpenOffice.org is like word not notepad. You should use an app like emacs, vim, nano or kate - an other benefit is that emacs and vim got syntax highligthing for among others perl.
    The reason why perl cant run the .sxw is that it's an open office document, not plain text file, and it appends the .sxw suffix because that checkbox was selected when you saved the file. You can use OOo to write source code, but I strongly discourage you from it - it's wasn't written to handle source code in the first place and really isn't any good at handling source code, but if you insist on using OOo, select plain text in the dropdown when you save the file ("Save As") and untick the checkbox that says something like 'append suffix' or so.
    Regards Scienitca (registered user #335819 - http://counter.li.org )
    --
    A master is nothing more than a student who knows something of which he can teach to other students.

  4. #4
    Linux Guru Cabhan's Avatar
    Join Date
    Jan 2005
    Location
    Seattle, WA, USA
    Posts
    3,252
    The real problem here, actually, is that OpenOffice saves in a rich text format by default. For example, the " symbol is different in OpenOffice than in a plain text editor, because it is NOT, in fact, the " symbol, but rather a nicer-looking one.

    You can write source code in OpenOffice, but be sure to save it as a plain text document.

    But yes, it is preferred to use a text editor such as vi, Emacs, Kate (KDE), or gedit (Gnome).

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •