Loading ...
Sorry, an error occurred while loading the content.

Re[2]: perl - prolog

Expand Messages
  • dionn@tomtom.com
    ... [...] ... That s real nice perl programs. Quick n dirty scripts might look differently. Mine usually start with a comment, but a line like this is very
    Message 1 of 1 , Feb 28, 2002
    • 0 Attachment
      Matthew wrote:
      > On Wed, Feb 27, 2002 at 10:43:36PM +0100, Bram Moolenaar wrote:
      > > Thomas Koehler wrote:
      [...]
      > > > %hash=();
      > > >
      > > > Ugly. :-(
      >
      > > Are there enough Perl files that start with a line like this that we
      > > should worry about the file being recognized as prolog?
      >
      > Probably not. A quick search through the Perl directories on my
      > machine didn't find any files where the first line began with "%".
      > Most started with lines matching one of the following:
      >
      > ^#
      > ^package
      > ^use\s
      > ^=head1
      > ^{
      > ^BEGIN
      > ^$
      > ^;#
      >
      > I found one which started with "/*", but that was a C program I'd
      > partially converted to Perl before I decided I didn't need it after
      > all.

      That's real nice perl programs. Quick'n'dirty scripts might look
      differently. Mine usually start with a comment, but a line like this is
      very often the first non-comment line:

      %list=();

      or

      %translate = ("a" => "een",
      "the" => "de");

      Simple dictionaries like that are one of the strong points of Perl...
      And yes, 80% of what I write in Perl is Quick'n'dirty get-the-job-done
      Don't-bother-with-warnings one-shot scripts.
      So by all means, check for a space after the '%' to decide if it's
      Prolog...

      --
      ---. /) | http://www.erebus.demon.nl/dion/nethack.html
      / \ / _ _ | _ _ _ The NetHack Index at Erebus
      -/ )\ | (_(_ (_) \_ ()\ ()\ \ dionnicolaas@...
      _/___/ \| -------------------' Dion Nicolaas
    Your message has been successfully submitted and would be delivered to recipients shortly.